css布局实现一只青蛙效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现一只青蛙效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
background-color: #48cae4;
}
.row {
display: flex;
flex-wrap: wrap;
flex-direction: row;
margin: 0 auto;
}
.column {
flex: 50%;
}
.head {
background-color: #9dcc1c;
border-radius: 50%;
height: 8.5rem;
width: 14rem;
margin: 0 auto;
margin-top: 15rem;
position: relative;
top: 0;
}
.head:before,
.head:after {
content: "";
background-color: #9dcc1c;
border-radius: 50%;
height: 5rem;
position: absolute;
width: 5rem;
}
.head:before {
top: -1rem;
left: 1rem;
}
.head:after {
left: 7.75rem;
top: -1rem;
}
.eye1 {
border-radius: 50%;
background-color: #333333;
width: 2rem;
height: 2rem;
margin: 0 auto;
margin-left: 2rem;
position: absolute;
}
.eye2 {
border-radius: 50%;
background-color: #333333;
width: 2rem;
height: 2rem;
margin: 0 auto;
margin-left: 9.5rem;
z-index: 1;
position: absolute;
}
.white_eye{
background-color: #ffffff;
border-radius: 50%;
width: 0.8rem;
height: 0.8rem;
margin-left: 1rem;
margin-top: 0.2rem;
}
.blush1{
border-radius: 50%;
background-color: #ffcc99;
width: 2.5rem;
height: 2.5rem;
margin: 0 auto;
margin-top: 3rem;
margin-left: 0.75rem;
position: absolute;
}
.blush2{
border-radius: 50%;
background-color: #ffcc99;
width: 2.5rem;
height: 2.5rem;
margin: 0 auto;
margin-top: 3rem;
margin-left: 10.5rem;
position: absolute;
z-index: 1;
}
.smile{
border-radius: 50%;
background-color: #9dcc1c;
border: 5px solid #000;
width: 6.5rem;
height: 2.5rem;
margin: 0 auto;
margin-top: 3rem;
margin-left: 3.35rem;
clip-path: inset(40% 0% 0% 0%);
position: absolute;
z-index: 1;
}
.frog_body {
border-radius: 50%;
background-color: #9dcc1c;
height: 8rem;
width: 11rem;
margin: 0 auto;
margin-top: -3rem;
margin-bottom: 3rem;
position: relative;
}
.frog_body:before, .frog_body:after {
content: &qu.........完整代码请登录后点击上方下载按钮下载查看
网友评论0