div+css实现正方形嵌套旋转视觉动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现正方形嵌套旋转视觉动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
.stage {
position: absolute;
width: 650px;
height: 650px;
left: 50%;
top: 50%;
margin: -325px 0 0 -325px;
border: 1px solid rgba(0, 0, 0, 0.2);
overflow: hidden;
}
.stage div {
position: absolute;
left: 50%;
top: 50%;
border: 1px solid #000;
transform-origin: 50% 50% 0;
-webkit-animation: move 700ms cubic-bezier(0.42, 0, 0.58, 1) 0s infinite alternate forwards;
animation: move 700ms cubic-bezier(0.42, 0, 0.58, 1) 0s infinite alternate forwards;
}
.stage div:nth-child(45) {
width: 15px;
height: 15px;
margin: -7.5px 0 0 -7.5px;
-webkit-animation-delay: -30ms;
animation-delay: -30ms;
}
.stage div:nth-child(44) {
width: 30px;
height: 30px;
margin: -15px 0 0 -15px;
-webkit-animation-delay: -60ms;
animation-delay: -60ms;
}
.stage div:nth-child(43) {
width: 45px;
height: 45px;
margin: -22.5px 0 0 -22.5px;
-webkit-animation-delay: -90ms;
animation-delay: -90ms;
}
.stage div:nth-child(42) {
width: 60px;
height: 60px;
margin: -30px 0 0 -30px;
-webkit-animation-delay: -120ms;
animation-delay: -120ms;
}
.stage div:nth-child(41) {
width: 75px;
height: 75px;
margin: -37.5px 0 0 -37.5px;
-webkit-animation-delay: -150ms;
animation-delay: -150ms;
}
.stage div:nth-child(40) {
width: 90px;
height: 90px;
margin: -45px 0 0 -45px;
-webkit-animation-delay: -180ms;
animation-delay: -180ms;
}
.stage div:nth-child(39) {
width: 105px;
height: 105px;
margin: -52.5px 0 0 -52.5px;
-webkit-animation-delay: -210ms;
animation-delay: -210ms;
}
.stage div:nth-child(38) {
width: 120px;
height: 120px;
margin: -60px 0 0 -60px;
-webkit-animation-delay: -240ms;
animation-delay: -240ms;
}
.stage div:nth-child(37) {
width: 135px;
height: 135px;
margin: -67.5px 0 0 -67.5px;
-webkit-animation-delay: -270ms;
animation-delay: -270ms;
}
.stage div:nth-child(36) {
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
-webkit-animation-delay: -300ms;
animation-delay: -300ms;
}
.stage div:nth-child(35) {
width: 165px;
height: 165px;
margin: -82.5px 0 0 -82.5px;
-webkit-animation-delay: -330ms;
animation-delay: -330ms;
}
.stage div:nth-child(34) {
width: 180px;
height: 180px;
margin: -90px 0 0 -90px;
-webkit-animation-delay: -360ms;
animation-delay: -360ms;
}
.stage div:nth-child(33) {
width: 195px;
height: 195px;
margin: -97.5px 0 0 -97.5px;
-webkit-animation-delay: -390ms;
animation-delay: -390ms;
}
.stage div:nth-child(32) {
width: 210px;
height: 210px;
margin: -105px 0 0 -105px;
-webkit-animation-delay: -420ms;
animation-delay: -420ms;
}
.stage div:nth-child(31) {
width: 225px;
height: 225px;
margin: -112.5px 0 0 -112.5px;
-webkit-animation-delay: -450ms;
animation-delay: -450ms;
}
.stage div:nth-child(30) {
width: 240px;
height: 240px;
margin: -120px 0 0 -120px;
-webkit-animation-delay: -480ms;
animation-delay: -480ms;
}
.stage div:nth-child(29) {
width.........完整代码请登录后点击上方下载按钮下载查看
网友评论0