A Pen by GEAUX⚜️TECH on CodePen.
Created
June 10, 2022 14:52
-
-
Save Sh00k-ThaD3v/9d925a0a799c25b2fc9b1c8fb047b92a to your computer and use it in GitHub Desktop.
Social Icon Glassmorph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a class="glassIco" href="#"><i class="fab fa-facebook-f"></i></a> | |
<a class="glassIco" href="#"><i class="fab fa-instagram"></i></a> | |
<a class="glassIco" href="#"><i class="fab fa-linkedin-in"></i></a> | |
<a class="glassIco" href="#"><i class="fab fa-whatsapp"></i></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin flex-center { display: flex; justify-content: center; align-items: center; } | |
/* | |
* Preparing stage | |
*/ | |
html, | |
body { padding: 0; margin: 0; height: 100%; } | |
body { position: relative; background-image: linear-gradient(135deg, #f97794 10%, #623aa2 100%); | |
@include flex-center; | |
&:before { | |
content: ""; | |
position: absolute; | |
top: 50%; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
border-top: 1px solid rgba(255, 255, 255, 0.2); | |
background: rgba(255, 255, 255, 0.06); | |
backdrop-filter: blur(5px); | |
z-index: -1; | |
} | |
} | |
/* | |
* Start | |
*/ | |
.glassIco { | |
--width: 100px; | |
&, & * { box-sizing: border-box; transition: 200ms; } | |
width: var(--width); | |
height: var(--width); | |
color: #fff; | |
font-size: 30px; | |
border-radius: 5px; | |
background: rgba(255, 255, 255, 0.05); | |
backdrop-filter: blur(2px); | |
border: 1px solid rgba(255, 255, 255, 0.2); | |
border-right-color: rgba(255, 255, 255, 0.1); | |
border-bottom-color: rgba(255, 255, 255, 0.1); | |
box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1); | |
text-decoration: none; | |
margin: 20px; | |
overflow: hidden; | |
@include flex-center; | |
&:before { | |
content: ""; | |
position: absolute; | |
display: block; | |
width: 50%; | |
height: 100%; | |
background: rgba(255, 255, 255, 0.5); | |
filter: blur(0px); | |
transition: 400ms; | |
transform: skewX(45deg) translateX(calc(var(--width) + 50%)); | |
} | |
&:hover { | |
transform: translateY(-20px); | |
&:before { | |
transform: skewX(45deg) translateX(calc(var(--width) * -1 - 50%)) | |
} | |
} | |
& > * { opacity: 0.8; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment