css实现孔雀开屏效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现孔雀开屏效果代码
代码标签: 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--blue: #221fad;
--light-blue: #4edff5;
--beak: #fff6e8;
--black: #1c1c1c;
--green:#006b56;
--light-green: #00a67d;
--yellow:#fae6b4;
--body: #003575;
}
* {
padding: 0;
margin: 0;
}
body {
background: #92b9e0;
}
.container {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.peacock {
width: 600px;
height: 450px;
position: relative;
border-radius: 160px;
z-index: -3;
}
.head {
position: absolute;
width: 50px;
height: 50px;
border-radius: 60% 40% 61% 39%/56% 50% 50% 44%;
top: 29%;
left: 48.5%;
background: var(--body);
}
.eye {
position: absolute;
background: white;
width: 15px;
height: 15px;
border: 2px solid var(--black);
top: 12px;
left: 12px;
border-radius: 70% 30% 100% 0%/100% 30% 70% 0%;
transform: rotate(12deg);
z-index: 4;
}
.eye-mark {
position: absolute;
background: var(--beak);
width: 26px;
height: 26px;
top: 7px;
left: 10px;
border-radius: 100% 0% 100% 0%/100% 0% 100% 0%;
transform: rotate(12deg);
z-index: 3;
}
.eye::after {
position: absolute;
content: "";
width: 80%;
height: 80%;
background: var(--black);
border-radius: 70% 30% 100% 0%/100% 30% 70% 0%;
left: 0;.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0