html怎样实现元素自动旋转,css3和html5如何实现这样的旋转的图?

恰好在练习css3 比较粗糙,大体思路同楼上

*{

background: #080808;

padding: 0;

margin: 0;

box-sizing: border-box;

}

.box{

width: 400px;

height: 400px;

position: relative;

margin: 300px;

}

@-webkit-keyframes spin-a{

form{

-webkit-transform:rotate(0deg)

}

to{

-webkit-transform:rotate(360deg)

}

}

@-webkit-keyframes spin-b{

form{

-webkit-transform:rotate(10deg)

}

to{

-webkit-transform:rotate(350deg)

}

}

.a{

position: absolute;

left: 0;

top: 0;

width: 400px;

height: 400px;

border-radius:50%;

border: 15px solid #0B3B3C;

border-top: 10px solid #080808;

border-bottom: 10px solid #080808;

-webkit-animation: spin-a 2s infinite linear;

background-color: #091717;

/* background-image: -webkit-radial-gradient(circle,#fff 160px,#091717 200px); */

}

.b{

position: absolute;

left: 25px;

top: 25px;

width: 350px;

height: 350px;

border-radius:50%;

border: 6px solid #17F6FB;

border-top: 10px solid #091717;

border-bottom: 10px solid #091717;

-webkit-animation: spin-a 3s infinite linear;

background-color: #0A3334;

/* background-image: -webkit-radial-gradient(circle,#fff 150px,#091717 180px); */

}

.c{

position: absolute;

left: 45px;

top: 45px;

width: 310px;

height: 310px;

border-radius:50%;

border: 6px solid #17F6FB;

border-top: 10px solid #0A3334;

border-bottom: 10px solid #0A3334;

-webkit-animation: spin-a 6s infinite linear;

background-color: #0A3334;

background-image: -webkit-radial-gradient(circle,#1F8989 100px,#0A3334 180px);

}

.d{

position: absolute;

left: 80px;

top: 80px;

width: 240px;

height: 240px;

border-radius:50%;

border: 15px solid #17F6FB;

border-top: 10px solid black;

border-bottom: 10px solid black;

-webkit-animation: spin-a 1.5s infinite linear;

background-color: black;

}

.e{

position: absolute;

left: 110px;

top: 110px;

width: 180px;

height: 180px;

border-radius:50%;

border: 4px solid #101D1D;

}

.f{

position: absolute;

left: 120px;

top: 120px;

width: 160px;

height: 160px;

border-radius:50%;

background-color: #080808;

}

\

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值