css+div实现彩色三维滚筒棒滚下来动画效果代码
代码语言:html
所属分类:动画
代码描述:css+div实现彩色三维滚筒棒滚下来动画效果代码
代码标签: css div 彩色 三维 滚筒棒 滚下来 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
*, *::before, *::after {
padding: 0;
margin: 0 auto;
box-sizing: border-box;
}
body {
background-color: #111;
color: #fff;
min-height: 100vh;
display: grid;
place-items: center;
perspective: 40em;
overflow: hidden;
font-size: 2vh;
* {
transform-style: preserve-3d;
}
}
.scene {
position: relative;
-webkit-animation: scene 60s infinite linear;
animation: scene 60s infinite linear;
--duration: 4s;
}
@-webkit-keyframes scene {
to { rotate: y -1turn; }
}
@keyframes scene {
to { rotate: y -1turn; }
}
.mainStick {
--angle: asin(3/5);
position: absolute;
inset: -0px -10em;
background-color: #fff;
-webkit-animation: poleBase var(--duration) infinite ease-in;
animation: poleBase var(--duration) infinite ease-in;
.stick {
position: absolute;
inset: 0em;
background-color: #f00;
-webkit-animation: poleTranslate var(--duration) calc(v.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0