本教程操作环境:windows10系统、css3版、DELL G3电脑css3动画怎么使圆形旋转?CSS3 圆环旋转效果一、CSS3圆环旋转效果 1原理:设置不同效果的边框,进行旋转<div class="demo"
本教程操作环境:windows10系统、css3版、DELL G3电脑
css3动画怎么使圆形旋转?
CSS3 圆环旋转效果
一、CSS3圆环旋转效果 1
原理:设置不同效果的边框,进行旋转
<div class="demo"></div><style>
.demo {
width: 250px;
height: 250px;
border: 50px solid red;
border-left-color: blue;
border-right-color: yellow;
border-top-color: #04f105;
margin: 100px;
border-radius: 50%;
animation: circle 2s infinite linear;
}
@keyframes circle {
0% {
transfORM: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}</style>
二、CSS 3圆环效果2
原理:使用多层边框下沟哦,执行旋转
<div class="demoout">
<div class="demo"></div></div><style>
body {
background: black;
}
.demo {
width: 250px;
height: 250px;
border: 3px solid white;
border-left-color: blue;
border-right-color: yellow;
margin: 25px;
border-radius: 50%;
animation: circle 4s infinite ease;
background: white;
}
.demoout {
width: 300px;
height: 300px;
border: 3px solid white;
border-top-color: green;
border-bottom-color: red;
margin: 100px;
border-radius: 50%;
animation: circle 4s infinite linear;
background: white;
}
@-WEBkit-keyframes circle {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}</style>
效果如下:
以上就是css3动画怎么使圆形旋转的详细内容,更多请关注编程网其它相关文章!
--结束END--
本文标题: css3动画怎么使圆形旋转
本文链接: https://www.lsjlt.com/news/206924.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2023-05-25
2023-05-25
2023-05-25
2023-05-25
2023-05-25
2023-05-24
2023-05-24
2023-05-24
2023-05-24
2023-05-24
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0