JAVA黑白圆圈图形_CSS3 黑白交替旋转圆圈

CSS

语言:

CSSSCSS

确定

body {

background-color: #55cc55;

overflow: hidden;

}

.ring {

display: none;

position: absolute;

top: 50%;

left: 50%;

-webkit-transform: translate(-50%, -50%);

transform: translate(-50%, -50%);

-webkit-transform-origin: center;

transform-origin: center;

border-top: solid 10px black;

border-bottom: solid 10px white;

border-left: none;

border-right: none;

border-radius: 50%;

box-sizing: border-box;

-webkit-animation: anim 20s infinite linear;

animation: anim 20s infinite linear;

}

.ring:nth-child(1) {

display: block;

width: 40px;

height: 40px;

-webkit-animation-duration: 20s;

animation-duration: 20s;

}

.ring:nth-child(2) {

display: block;

width: 80px;

height: 80px;

-webkit-animation-duration: 10s;

animation-duration: 10s;

}

.ring:nth-child(3) {

display: block;

width: 120px;

height: 120px;

-webkit-animation-duration: 6.66667s;

animation-duration: 6.66667s;

}

.ring:nth-child(4) {

display: block;

width: 160px;

height: 160px;

-webkit-animation-duration: 5s;

animation-duration: 5s;

}

.ring:nth-child(5) {

display: block;

width: 200px;

height: 200px;

-webkit-animation-duration: 4s;

animation-duration: 4s;

}

.ring:nth-child(6) {

display: block;

width: 240px;

height: 240px;

-webkit-animation-duration: 3.33333s;

animation-duration: 3.33333s;

}

.ring:nth-child(7) {

display: block;

width: 280px;

height: 280px;

-webkit-animation-duration: 2.85714s;

animation-duration: 2.85714s;

}

.ring:nth-child(8) {

display: block;

width: 320px;

height: 320px;

-webkit-animation-duration: 2.5s;

animation-duration: 2.5s;

}

.ring:nth-child(9) {

display: block;

width: 360px;

height: 360px;

-webkit-animation-duration: 2.22222s;

animation-duration: 2.22222s;

}

.ring:nth-child(10) {

display: block;

width: 400px;

height: 400px;

-webkit-animation-duration: 2s;

animation-duration: 2s;

}

@-webkit-keyframes anim {

0% {

-webkit-transform: translate(-50%, -50%) rotate(0deg);

transform: translate(-50%, -50%) rotate(0deg);

}

100% {

-webkit-transform: translate(-50%, -50%) rotate(360deg);

transform: translate(-50%, -50%) rotate(360deg);

}

}

@keyframes anim {

0% {

-webkit-transform: translate(-50%, -50%) rotate(0deg);

transform: translate(-50%, -50%) rotate(0deg);

}

100% {

-webkit-transform: translate(-50%, -50%) rotate(360deg);

transform: translate(-50%, -50%) rotate(360deg);

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值