1 Star 0 Fork 1

uxuryplx/css_动画

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
旋转色盘.html 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
uxuryplx 提交于 2023-07-07 15:36 . first commit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
body{
margin: 0;
padding: 0;
}
.loader{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 100px;
height: 100px;
border-radius: 50%;
overflow: hidden;
animation: animate .5s linear infinite;
}
@keyframes animate {
0%{
transform:translate(-50%,-50%) rotate(359deg);
}
100%{
transform:translate(-50%,-50%) rotate(0deg);
}
}
.loader span{
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
left: 50%;
transform-origin: left;
}
.loader span:nth-child(1){
background-color: #fea503;
transform: rotate(0deg);
z-index: 2;
}
.loader span:nth-child(2){
background-color: #ffd203;
transform: rotate(60deg);
z-index: 3;
}
.loader span:nth-child(3){
background-color: #54cd28;
transform: rotate(120deg);
z-index: 4;
}
.loader span:nth-child(4){
background-color: #129cf5;
transform: rotate(180deg);
z-index: 5;
}
.loader span:nth-child(5){
background-color: #bb5ed3;
transform: rotate(240deg);
z-index: 6;
}
.loader span:nth-child(6){
background-color: #ff4f45;
transform: rotate(300deg);
z-index: 7;
overflow: hidden;
}
.loader span:nth-child(6):before{
content: '';
position: absolute;
top: 45px;
left: -72px;
width: 100%;
height: 100%;
background: #ffd203;
border-radius: 50%;
z-index: 2;
}
.loader span:nth-child(6):after{
content: '';
position: absolute;
top: 42px;
left: -23px;
width: 100%;
height: 100%;
background: #fea503;
border-radius: 50%;
}
</style>
<body>
<div class="loader">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/plxvervewvr434232/css-animation.git
git@gitee.com:plxvervewvr434232/css-animation.git
plxvervewvr434232
css-animation
css_动画
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385