css布局实现万圣节南瓜人头效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现万圣节南瓜人头效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
html, body {
background: black;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.pumpkin {
position: relative;
z-index: 1;
height: 13.4em;
width: 17em;
background: orange;
border: 0.2em solid crimson;
border-radius: 60%/120%;
box-shadow: inset 0 0px 30px crimson;
animation: float 2s infinite;
}
.pumpkin .decor {
height: 12.6em;
width: 6.5em;
position: absolute;
left: 5em;
border-radius: 60%/100%;
border-bottom: 0.4em solid crimson;
border-top: 0.4em solid crimson;
box-shadow: inset 0 0px 15px crimson;
z-index: -1;
}
.pumpkin .decor:after {
content: "";
display: block;
height: 13em;
width: 14em;
position: absolute;
bottom: -0.7em;
left: -3.5em;
border-radius: 70%/100%;
border-bottom: 0.4em solid crimson;
border-top: 0.4em solid crimson;
box-shadow: inset 0 0px 15px crimson;
}
.pumpkin .eye {
margin-top: 3em;
margin-left: 2em;
width: 0;
height: 0;
border-style: solid;
border-width: 0 35px 35px 35px;
border-color: transparent transparent black transparen.........完整代码请登录后点击上方下载按钮下载查看
网友评论0