css布局实现电动三轮车嘟嘟车行驶在都市路上动画效果代码
代码语言:html
所属分类:动画
代码描述:css布局实现电动三轮车嘟嘟车行驶在都市路上动画效果代码
代码标签: 电动 三轮车 嘟嘟 车 行驶 在 都市 路上 动画 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
*,
*::after,
*::before {
box-sizing: border-box;
}
body {
background-color: #f8fbff;
display: grid;
place-content: center;
height: 100vh;
margin: 0;
}
.bg {
background-color: #f8fbff;
background-image: url("//repo.bfw.wiki/bfwrepo/image/60a2ff042098f.png");
background-position-y: center;
background-attachment: fixed;
background-repeat: repeat-x;
background-position-x: -10%;
animation: bg linear 20s infinite;
}
.tuk {
width: 700px;
height: 428px;
z-index: 5;
position: relative;
margin-left: -20px;
}
.body {
width: 595px;
height: 374px;
background: #262523;
border-radius: 80px 150px 180px 60px;
position: relative;
}
.body .empty-space {
width: 270px;
height: calc(100% - 40px);
margin-top: 20px;
background-color: #f8fbff;
position: absolute;
right: 140px;
z-index: 1;
border-radius: 30px 10px 10px;
}
.body .empty-space .seperator {
height: 100%;
width: 8px;
background: #bbbbbe;
right: 125px;
position: absolute;
}
.body .empty-space .seperator .seat-base {
background: #c80f1f;
width: 20px;
border-radius: 4px 4px 0 0;
height: 140px;
bottom: 0;
left: -5px;
position: absolute;
}
.body .empty-space .seperator .seat-base::after {
content: "";
width: 10px;
height: 82px;
position: absolute;
background: #c80f1f;
bottom: 0;
left: 20px;
border-radius: 0 2px 0 0;
}
.body .empty-space .seperator .seat-base .seat {
background: #262523;
width: 60px;
height: 15px;
border-radius: 0 10px 10px 0;
position: absolute;
top: 40px;
left: 20px;
}
.body .empty-space .seperator .seat-base .seat::before {
content: "";
position: absolute;
width: 8px;
height: 40px;
background: #262523;
border-radius: 10px;
top: -90px;
left: -8px;
}
.body .empty-space .cover {
width: 140px;
height: 137px;
background: #c80f1f;
position: absolute;
bottom: 0;
}
.body .empty-space .cover .sheet {
width: 100%;
height: 125px;
background: #262523;
border-radius: 2px 2px 20px 60px;
z-index: 100;
position: absolute;
top: 10px;
}
.body .empty-space .cover .sheet .sheet-bars {
display: flex;
flex-direction: column;
transform: scaleX(-1);
gap: 18px;
padding: 12px 12px;
margin: 0;
}
.body .empty-space .cover .sheet .sheet-bars > li {
width: 100%;
height: 5px;
border-radius: 10px;
list-style: none;
background: #3d3c39;
}
.body .empty-space .cover .sheet .sheet-bars > li:nth-child(4) {
width: 90%;
}
.body .empty-space .cover .sheet .sheet-bars > li:nth-child(5) {
width: 70%;
}
.body .base {
height: 156px;
width: 100%;
background: #c80f1f;
position: absolute;
bottom: 0;
border-radius: 0 0 150px 60px;
}
.body .base .back-bars {
margin: 0;
padding: 10px 12px;
display: flex;
flex-direction: column;
gap: 10px;
}
.body .base .back-bars > li {
list-style: none;
margin: 0;
width: 160px;
height: 7px;
border-radius: 10pxa;
background-color: #e01123;
}
.body .windscreen {
width: 110px;
height: 180px;
margin-top: 24px;
position: absolute;
right: 15px;
border-radius: 0 90% 10px 8px;
overflow: hidden;
}
.body .windscreen .screen {
position: absolute;
width: 120px;
height: 200px;
background-color: rgba(197, 239, 239, 0.65);
}
.body .windscreen::before {
content: "";
width: 40px;
height: 200px;
left: 10px;
top: 10px;
background: rgba(255, 255, 255, 0.3);
position: absolute;
transform: rotate(30deg);
}
.body .windscreen::after {
content: "";
width: 20px;
height: 200px;
left: 0;
top: -40px;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0