div+css实现伊丽莎白二世老太太微笑动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现伊丽莎白二世老太太微笑动画效果代码
代码标签: div css 伊丽莎白 二世 老太太 微笑 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--pink: #cf64ad;
--skin: #e5b5a4;
--hair: #c4c1bf;
--red: #c73f3f;
--pearl: #ede5d5;
}
* {
box-sizing: border-box;
}
html,
body {
background: #111;
color: white;
margin: 0;
padding: 0;
font-family: monospace;
}
html {
width: 100%;
min-height: 100vh;
display: grid;
align-content: center;
}
ul,
ul li {
list-style: none;
margin: 0;
padding: 0;
}
queen-liz {
position: relative;
display: grid;
align-content: end;
width: 90vmin;
height: 90vmin;
background: #796961;
margin: 0 auto;
border-radius: 5px;
z-index: 2;
box-shadow: 0 -15vmin 15vmin rgba(0,0,0,0.35) inset;
overflow: hidden;
cursor: pointer;
}
queen-liz:hover {
background: #665952;
}
queen-liz,
queen-liz *,
queen-liz *::before,
queen-liz *::after {
transition: all 0.4s ease;
}
queen-body {
display: grid;
align-content: top;
position: relative;
width: 80%;
height: 30vmin;
background: var(--pink);
margin: 0 auto;
border-radius: 50% 50% 0 0;
z-index: 2;
box-shadow: 0 3vmin 5vmin inset rgba(50,0,0,0.2);
}
queen-body::after {
content: "";
position: absolute;
width: 25%;
left: 28%;
height: 110%;
border-right: 3px solid #a9468a;
box-shadow: 1.5vmin 1.5vmin 1.5vmin rgba(60, 0, 0, 0.15);
transform: rotate(-10deg);
}
.neck {
width: 30%;
height: 12vmin;
background: var(--skin);
margin: 0 auto;
border-radius: 30% 30% 100% 100%;
z-index: 1;
box-shadow: 0 -2vmin 2vmin rgba(60, 0, 0, 0.15) inset;
position: relative;
border: 0.5vmin solid #a9468a;
border-bottom-width: 1vmin;
border-top-width: 0;
}
.neck::before {
content: "";
position: absolute;
width: 80%;
left: 10%;
height: 15vmin;
background: inherit;
bottom: 50%;
border-radius: 0 0 20% 20%;
box-shadow: 0 12vmin 3vmin -2vmin rgba(30, 0, 0, 0.2) inset;
z-index: 1;
}
.neck::after {
content: "";
position: absolute;
left: 7.25%;
top: -6vmin;
height: 16.5vmin;
width: 16.5vmin;
border: 0px dotted var(--pearl);
border-bottom: 1.5vmin dotted var(.........完整代码请登录后点击上方下载按钮下载查看
网友评论0