css+js实现三维棋盘旋转动画效果代码
代码语言:html
所属分类:三维
代码描述:css+js实现三维棋盘旋转动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
text-decoration: none;
list-style-type: none;
}
body {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
position: relative;
background: #242424;
}
.container {
width: 600px;
height: 600px;
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
perspective: 10000px;
perspective-origin: center;
animation: perspective 8s cubic-bezier(0.4, 0, 0.1, 1) infinite;
}
.container .cube {
width: 50px;
height: 100px;
position: absolute;
transform-style: preserve-3d;
transform: rotate3d(1, 1, 1, 0deg);
}
.container .cube.odd .side.bottom, .container .cube.odd .side.top {
background-color: #fff;
}
.container .cube.odd .side.front, .container .cube.odd .side.back, .container .cube.odd .side.left, .container .cube.odd .side.right {
background: #d7d7d7;
background: linear-gradient(0deg, #d7d7d7 0%, #000 100%);
}
.container .cube.even .side.bottom, .container .cube.even .side.top {
background-color: #000;
}
.container .cube.even .side.front, .container .cube.even .sid.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0