div+css布局实现自行车效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css布局实现自行车效果代码

代码标签: div css 布局 自行车

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
<style>
body{
    margin: 0px;
}
.container{
    position: relative;
    max-width: 1000px;
    width: 100%;
    margin: 0px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.cycle_container{
    position: relative;
    width: 500px;
    height: 400px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
.tier{
    position: relative;
    width: 200px;
    height: 200px;
    border:20px solid #0f0f6a;
    border-radius: 50%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tier::after,.tier::before{
    position: absolute;
    content: "";
    border-radius: 50%;
    box-sizing: border-box;
}
.tier:after{
    height:100%;
    width:100%;
    border:10px solid #ddd;
}
.tier::before{
    height: 40px;
    width: 40px;
    background: #0f0f6a;
    z-index: -1;
}
.pedle_round{
    position: absolute;
    height: 40px;
    width: 40px;
    background: #0f0f6a;
    border-radius: 50%;
    box-sizing: border-box;
    top:74%;
    left: 42%;
}
.pedle_round::after{
    position: absolute;
    content: "";
    height: 140px;
    width: 12px;
    background:#ddd;
    border-radius: 20px;
    transform: rotate(278deg);
    top: -140%;
    right: 193%;
    z-index: -1;
}
.pedle_round::before{
    position: absolute;
    content: "";
    height: 123px;
    width: 4px;
    background: #0f0f6a;
    transform: rotate(278deg);
    top: -98%;
    right: 205%;
}
.seat{
    position: absolute;
    width: 70px;
    height: 20px;
    background:#0f0f6a;
    border-radius: 12px;
    top: 35%;
    left: 23%;
}
.seat::after{
    position: absolute;
    content: "";
    width: 48px;
    height: 16px;
    border-radius: 12px;
    background: #0f0f6a;
    top: -221%;
    left: 253%;
    transform: rotate(9deg);
}
.front_rod{
    position: absolute;
    width: 50px;
    height: 15px;
    background: #ddd;
    top: 28%;
    left: 58%;
    transform: rotate(329deg);
    z-index: -1;
    border-radius: 12px;
}
.front_rod::after,.front_rod::before{
    position: absolute;
    content: "";
    height: 203px;
    width: 12px;
    background: #ddd;
    border-rad.........完整代码请登录后点击上方下载按钮下载查看

网友评论0