纯css实现两人互殴404页面效果
代码语言:html
所属分类:布局界面
代码描述:纯css实现两人互殴404页面效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Concert+One" rel="stylesheet">
<style>
body {
background-color: #FF7F2E;
font-family: 'Concert One', cursive;
margin: 0;
overflow: hidden;
padding: 0;
}
/*/////////////////// rules */
/*/////////////////// scene */
.text {
left: 50%;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
color: rgba(19, 36, 44, 0.1);
font-size: 30em;
text-align: center;
top: 40%;
}
.container {
left: 50%;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
height: 300px;
width: 500px;
}
.container:after {
position: absolute;
content: "";
background-color: rgba(19, 36, 44, 0.1);
border-radius: 12px;
bottom: 40px;
height: 12px;
left: 80px;
width: 350px;
z-index: -1;
}
/*/////////////////// caveman */
.caveman {
height: 300px;
position: absolute;
width: 250px;
}
.caveman:nth-child(1) {
right: 20px;
}
.caveman:nth-child(2) {
left: 20px;
transform: rotateY(180deg);
}
.head {
position: absolute;
background-color: #13242C;
border-radius: 50px;
height: 140px;
left: 60px;
top: 25px;
width: 65px;
}
.head:after, .head:before {
content: "";
position: absolute;
background-color: #13242C;
border-radius: 10px;
height: 20px;
width: 7px;
}
.head:after {
left: 35px;
top: -8px;
transform: rotate(20deg);
}
.head:before {
left: 30px;
top: -8px;
transform: rotate(-20deg);
}
.head .eye {
left: 50%;
position: absolute;
transform: translateX(-50%);
background-color: #EAB08C;
border-radius: 50px;
height: 16px;
left: 45%;
top: 40px;
width: 48px;
}
.head .eye:after, .head .eye:before {
content: "";
position: absolute;
top: 50%;
transform: translateY(-50%);
background-color: #13242C;
border-radius: 50%;
height: 5px;
width: 5px;
}
.head .eye:after {
left: 5px;
}
.head .eye:before {
right: 9px;
}
.head .eye .nose {
left: 50%;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
background-color: #D9766C;
border-left: 8px solid rgba(19, 36, 44, 0.1);
border-radius: 10px;
box-sizing: border-box;
height: 35px;
left: 45%;
top: 12px;
width: 15px;
}
.shape {
left: 50%;
position: absolute;
transform: translateX(-50%);
border-radius: 50%;
height: 140px;
overflow: hidden;
top: 70px;
width: 140px;
}
.shape .circle {
position: absolute;
border-radius: 50%;
height: 60px;
width: 60px;
}
.shape .circle:after, .shape .circle:before {
content: "";
position: absolute;
border-radius: 50%;
height: 20px;
width: 20px;
}
.shape .circle:after {
left: 50px;
top: 10px;
}
.shape .circle:before {
left: 60px;
top: 45px;
}
.shape .circle:nth-child(1) {
left: -12px;
top: 80px;
}
.shape .circle:nth-child(2) {
right: 10px;
top: 0px;
transform: rotate(90deg);
}
.shape .circle:nth-child(2):after {
left: 65px;
top: 10px;
}
.shape .circle:nth-child(2):before {
display: none;
}
.caveman:nth-child(1) .shape {
background-color: #D13433;
}
.caveman:.........完整代码请登录后点击上方下载按钮下载查看
网友评论0