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;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0