Review Showcase Animated Icon
by Spencer Smith
HTML
<div class="icon">
<div class="bg"></div>
<div class="review d2">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
</div>
<div class="review d1">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
</div>
<div class="review">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
<img src="https://effortlessreviews.com/static-showcase/img/star.svg">
</div>
</div>
SCSS
* { box-sizing: border-box; }
body {
background-color: black;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.icon {
background-color: white;
width: 400px;
height: 400px;
position: relative;
text-align: center;
}
.review {
background-color: white;
padding: 15px 15px 16px;
border-radius: 10px;
box-shadow: 0 3px 11px -2px #00000099;
white-space: nowrap;
animation: pass-by 3s cubic-bezier(0, 0.44, 1, 0.62) infinite forwards;
overflow: hidden;
display: flex;
position: absolute;
width: fit-content;
top: 0;
left: 55px;
transform: translateY(-60px);
img {
height: 45px;
float: left;
}
img + img {
margin-left: 5px;
}
}
.bg {
position: absolute;
top: 30px;
bottom: 30px;
right: 30px;
left: 30px;
background-color: rgba(255, 215, 0, 0.49);
border-radius: 10px;
}
.d1 {
animation-delay: 1s;
}
.d2 {
animation-delay: 2s;
}
@keyframes pass-by {
0% {
transform: translateY(-100px)
}
100% {
transform: translateY(440px)
}
}