css+div实现弹簧狗狗效果代码
代码语言:html
所属分类:布局界面
代码描述:css+div实现弹簧狗狗效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Space+Mono:400,400i,700,700i" rel="stylesheet">
<style>
body {
background: #81D2F6;
}
h1 {
position: absolute;
top: 20px;
width: 99%;
text-align: center;
font-weight: normal;
font-family: "Space Mono", monospace;
font-size: 2rem;
}
.wrap {
width: 520px;
margin: 200px auto;
position: relative;
display: flex;
}
.front,
.rear,
.middle {
position: relative;
}
.slink-connector {
background-color: #CE7829;
height: 100px;
width: 70px;
border-radius: 90px 20px 20px 90px;
position: absolute;
z-index: 2;
}
.leg {
background-color: #832319;
width: 15px;
height: 90px;
transform: rotate(-8deg);
transform-origin: top left;
position: absolute;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
bottom: -60px;
box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.1);
}
.mouth {
position: absolute;
background-color: #F8E896;
width: 80px;
height: 40px;
right: -50px;
top: 45px;
border-radius: 100% 50%;
box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.1);
}
.mouth.top {
transform-origin: left;
}
.mouth.top:after {
position: absolute;
content: "";
width: 15px;
height: 15px;
right: -3px;
border-radius: 50%;
background-color: #000;
z-inddex: 10;
box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.1);
}
.mouth.bottom {
transform-origin: left;
}
.foot {
background-color: #F8E896;
width: 50px;
height: 16px;
position: absolute;
z-index: 6;
bottom: -5px;
left: .........完整代码请登录后点击上方下载按钮下载查看
网友评论0