CSS3實現雙眼眨眼效果
阿新 • • 發佈:2021-02-04
技術標籤:CSS3
<div class="box">
<div class="yanjin">
<div class="demo">歡迎來到VUE3</div>
<div class="demo">歡迎來到VUE3</div>
</div>
</div>
.box {
width: 750px;
.yanjin {
width: 100%;
display : flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
.demo {
width: 200px;
height: 100px;
line-height: 100px;
text-align: center;
background: #228B22;
font-size: 28px;
color: #fff;
animation: mymove 2.5s infinite;
border-radius: 50%;
}
@keyframes mymove {
20% {
height: 100px;
}
25% {
height: 0;
}
30% {
height: 100px;
}
80% {
height: 100px;
}
85% {
height: 0;
}
90% {
height: 100px;
}
95% {
height: 0;
}
}
}
}