css实现自动自行车骑行动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现自动自行车骑行动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body, .bike {
display: flex;
justify-content: center;
align-items: center;
}
body {
background: #7c606b;
margin: 0;
height: 100vh;
}
.bike {
position: relative;
height: 100%;
width: 700px;
min-height: 700px;
min-width: 700px;
max-height: 700px;
max-width: 700px;
}
.frame {
/* main bike frame */
position: absolute;
top: 35.7%;
left: 35.7%;
height: 200px;
width: 200px;
box-sizing: border-box;
background: transparent;
border-left: 10px solid #fcbcb8;
border-right: 10px solid #fcbcb8;
transform: rotate(-25deg);
background-image: linear-gradient(-30deg, transparent 21%, #fcbcb8 21%, #fcbcb8 25%, transparent 25%), linear-gradient(180deg, transparent 45%, #fcbcb8 45%, #fcbcb8 50%, transparent 50%);
/* frame extending over front wheel*/
box-shadow: 95px 165px 0 -95px #fcbcb8, 95px 160px 0 -95px #fcbcb8, 95px 155px 0 -95px #fcbcb8, 95px 150px 0 -95px #fcbcb8, 95px 145px 0 -95px #fcbcb8, 95px 140px 0 -95px #fcbcb8, 95px 135px 0 -95px #fcbcb8, 95px 130px 0 -95px #fcbcb8, 95px 125px 0 -95px #fcbcb8, 95px 120px 0 -95px #fcbcb8, 95px 110px 0 -95px #fcbcb8, 95px 105px 0 -95px #fcbcb8;
}
.frame:before, .frame:after {
position: absolute;
content: "";
}
.frame:before {
/* back frame for crate */
height: 130px;
width: 100px;
top: 5%;
right: 100%;
background: tra.........完整代码请登录后点击上方下载按钮下载查看
网友评论0