css实现滑板车滑动旋转动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现滑板车滑动旋转动画效果代码,鼠标点击滑板车看效果。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(to right, #e1eec3, #f05053);
overflow: hidden;
}
body h1 {
text-transform: uppercase;
font-size: 12px;
color: #fff;
opacity: 0.25;
margin-top: 400px;
}
body .linewrap {
position: absolute;
width: 110vw;
height: 110vh;
top: -5vh;
left: 20vw;
transform: skewX(-50deg);
z-index: -1;
}
body .line {
width: 1.5px;
height: 100px;
background: linear-gradient(to bottom, transparent, #fff);
position: absolute;
top: -50vh;
left: 0vw;
-webkit-animation: lines 3s linear infinite;
animation: lines 3s linear infinite;
transform: scaleY(0.25) translateY(110vh);
opacity: 0.5;
}
@-webkit-keyframes lines {
to {
transform: scaleY(1) translateY(150vh);
}
}
@keyframes lines {
to {
transform: scaleY(1) translateY(150vh);
}
}
body .line:nth-of-type(1) {
left: 5vw;
height: 10px;
}
body .line:nth-of-type(2) {
left: 10vw;
height: 20px;
}
body .line:nth-of-type(3) {
left: 15vw;
height: 30px;
}
body .line:nth-of-type(4) {
left: 20vw;
height: 40px;
}
body .line:nth-of-type(5) {
left: 25vw;
height: 50px;
}
body .line:nth-of-type(6) {
left: 30vw;
height: 60px;
}
body .line:nth-of-type(7) {
left: 35vw;
height: 70px;
}
body .line:nth-of-type(8) {
left: 40vw;
height: 80px;
}
body .line:nth-of-type(9) {
left: 45vw;
height: 90px;
}
body .line:nth-of-type(10) {
left: 50vw;
height: 100px;
}
body .line:nth-of-type(11) {
left: 55vw;
height: 1.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0