1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > 波浪线动画html 如何用CSS3实现一个简单的波浪线动画

波浪线动画html 如何用CSS3实现一个简单的波浪线动画

时间:2021-07-21 18:43:44

相关推荐

波浪线动画html 如何用CSS3实现一个简单的波浪线动画

CSS

语言:

CSSSCSS

确定

@keyframes wave {

0% {

border-radius: 25%;

}

100% {

border-radius: 50%;

}

}

@keyframes wave-after {

0% {

border-radius: 25%;

left: -50px;

}

100% {

border-radius: 50%;

left: -42px;

}

}

@keyframes wave-before {

0% {

border-radius: 25%;

left: 44px;

}

100% {

border-radius: 50%;

left: 36px;

}

}

@keyframes ocean {

0% {

top: 0;

}

100% {

top: 10px;

}

}

body {

background: #26C6DA;

}

.loader {

position: absolute;

top: 0;

bottom: 0;

left: 0;

right: 0;

margin: auto;

width: 300px;

height: 30px;

animation: ocean .9s infinite alternate ease-in-out;

}

.loading,

.loading:after,

.loading:before {

width: 60px;

height: 60px;

border-radius: 50%;

border: 3px solid transparent;

border-bottom-color: #0097A7;

box-sizing: border-box;

}

.loading {

position: relative;

margin: auto;

margin-bottom: 10px;

animation: wave 1.1s infinite alternate ease-in-out;

}

.loading:after,

.loading:before {

position: absolute;

content: "";

displsy: block;

top: -3px;

}

.loading:after {

left: -44px;

animation: wave-after 1.1s infinite alternate ease-in-out;

}

.loading:before {

left: 38px;

animation: wave-before 1.1s infinite alternate ease-in-out;

}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。