1 Star 0 Fork 1

uxuryplx/css_动画

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
3D旋转动画效果.html 2.20 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;
background: #607d8d;
}
.box{
position: absolute;
top: calc(50% - 100px);
left: calc(50% - 135px);
height: 200px;
transform-style: preserve-3d;
transform: perspective(1000px) rotateY(45deg);
}
.box div{
position: absolute;
top: 0;
left: 0;
height: 100%;
display: flex;
transform-style: preserve-3d;
}
.box div span{
position: relative;
display: block;
width: 50px;
height: 100%;
background: linear-gradient(#e8e8e8,#a7a7a7,#e8e8e8);
animation: animate 2.8s linear infinite;
}
.box div span::before{
content: '';
position: absolute;
display: block;
width: 100%;
height: 100%;
background: #000;
transform-style: preserve-3d;
transform: translateX(-25px) scaleY(0.5);
}
.box div span:nth-child(1){
animation-delay: 0s;
}
.box div span:nth-child(2){
animation-delay: 0.2s;
}
.box div span:nth-child(3){
animation-delay: 0.4s;
}
.box div span:nth-child(4){
animation-delay: 0.6s;
}
.box div span:nth-child(5){
animation-delay: 0.8s;
}
.box div span:nth-child(6){
animation-delay: 1s;
}
.box div span:nth-child(7){
animation-delay: 1.2s;
}
.box div span:nth-child(8){
animation-delay: 1.4s;
}
.box div span:nth-child(9){
animation-delay: 1.6s;
}
@keyframes animate {
0%{
transform: rotateX(0deg);
}
100%{
transform: rotateX(360deg);
}
}
</style>
<body>
<div class="box">
<div>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
</div>
</div>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/plxvervewvr434232/css-animation.git
git@gitee.com:plxvervewvr434232/css-animation.git
plxvervewvr434232
css-animation
css_动画
master

搜索帮助