A Pen by John K. Speck on CodePen.
Created
June 30, 2021 23:24
-
-
Save speckworks/d3eca8d1790a5d74e71898ad57b4facf to your computer and use it in GitHub Desktop.
loading shimmer (Facebook Loading Shimmer)
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
<div class="card br"> | |
<div class="wrapper"> | |
<div class="profilePic animate din">ham de doo dee</div> | |
<div class="comment animate w80">whut comment</div> | |
<div class="box animate">whut box</div> | |
<div class="button animate"></div> | |
<div class="button animate"></div><div class="button animate"></div> | |
</div> | |
<div> |
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
.br { | |
border-radius: 8px; | |
} | |
.w80 { | |
width: 80%; | |
} | |
.card { | |
border: 2px solid #fff; | |
box-shadow:0px 0px 10px 0 #a9a9a9; | |
padding: 30px 40px; | |
width: 80%; | |
margin: 50px auto; | |
} | |
.wrapper { | |
width: 0px; | |
animation: fullView 0.5s forwards cubic-bezier(0.250, 0.460, 0.450, 0.940); | |
display: flex; | |
flex-direction: column; | |
flex-wrap: wrap; | |
} | |
.profilePic { | |
height: 30vw; | |
width: 20vw; | |
flex: 1; | |
color: transparent; | |
} | |
.comment { | |
//height: 10px; | |
background: #777; | |
margin-top: 20px; | |
width: 40%; | |
flex: 1; | |
color: transparent; | |
} | |
.box { | |
height: 60vh; | |
background: #777; | |
margin-top: 20px; | |
width: 50%; | |
flex: 1 0 50%; | |
color: transparent; | |
} | |
@keyframes fullView { | |
100% { | |
width: 100%; | |
} | |
} | |
.animate { | |
animation : shimmer 2s infinite linear; | |
background: linear-gradient(to right, #eff1f3 4%, #e2e2e2 25%, #eff1f3 36%); | |
background-size: 1000px 100%; | |
} | |
@keyframes shimmer { | |
0% { | |
background-position: -1000px 0; | |
} | |
100% { | |
background-position: 1000px 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment