纯css绘制一对企鹅夫妇效果
代码语言:html
所属分类:布局界面
代码描述:纯css绘制一对企鹅夫妇效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
background: #005aa7;
/* fallback for old browsers */
background: -webkit-linear-gradient(to bottom, #005aa7, #fffde4);
/* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to bottom, #005aa7, #fffde4);
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.flex, .outer-container, .outer-container .penguin-wrapper .penguin-back {
display: flex;
justify-content: center;
}
.eye-ball, .outer-container .penguin-wrapper .penguin-back .penguin-stomach-surface .penguin-face .eye-right::before, .outer-container .penguin-wrapper .penguin-back .penguin-stomach-surface .penguin-face .eye-left::before {
content: '';
position: absolute;
z-index: 2;
width: 35%;
height: 35%;
border-radius: 50%;
background: #FFF;
top: 4px;
left: 2px;
}
.blush, .outer-container .girl .eye-left::after, .outer-container .girl .eye-right::after {
content: '';
position: absolute;
width: 50%;
height: 50%;
z-index: 1001;
box-shadow: 0 0 5px 5px pink;
background: pink;
border-radius: 50%;
}
.outer-container {
position: relative;
align-items: center;
width: 100%;
height: 100vh;
}
.outer-container .penguin-wrapper {
position: relative;
}
.outer-container .penguin-wrapper .bow {
position: relative;
z-index: 100;
width: 0;
border-bottom-left-radius: 90%;
border-top-left-radius: 90%;
border-top-right-radius: 90%;
border-bottom-right-radius: 90%;
border-top: 15px solid transparent;
border-left: 15px solid #E8509B;
border-bottom: 15px solid transparent;
border-right: 15px solid #E8509B;
}
.outer-container .penguin-wrapper .bow::before {
content: '';
position: absolute;
top: -4px;
left: -3px;
z-index: 10;
width: 7px;
height: 7px;
border-radius: 50%;
background: black;
}
.outer-container .penguin-wrapper .penguin-back.........完整代码请登录后点击上方下载按钮下载查看
网友评论0