纯css实现两人互殴404页面效果

代码语言:html

所属分类:布局界面

代码描述:纯css实现两人互殴404页面效果

代码标签: 两人 互殴 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:nth-child(1) .shape .circle {
  background-color: #932422;
}
.caveman:nth-child(1) .shape .circle:after, .caveman:nth-child(1) .shape .circle:before {
  background-color: #932422;
}

.caveman:nth-child(2) .shape {
  background-color: #932422;
}
.caveman:nth-child(2) .shape .circle {
  background-color: #D13433;
}
.caveman:nth-child(2) .shape .circle:after, .caveman:nth-child(2) .shape .circle:before {
  background-color: #D13433;
}

.arm-right {
  position: absolute;
  background-color: #EAB08C;
  border-left: 8px solid rgba(19, 36, 44, 0.1);
  border-radius: 50px;
  box-sizing: border-box;
  height: 180px;
  left: 135px;
  top: 80px;
  transform-origin: 30px 30px;
  width: 60px;
  z-index: 1;
}
.arm-right .club {
  position: absolute;
  border-bottom: 110px solid #601513;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  height: 0;
  left: -60px;
  top: 120px;
  transform: rotate(70deg);
  width: 20px;
}
.arm-right .club:after, .arm-right .club:before {
  position: absolute;
  content: "";
  background-color: #601513;
  border-radius: 50%;
  left: 0;
}
.arm-right .club:after {
  height: 20px;
  width: 20px;
  top: -10px;
}
.arm-right .club:before {
  height: 40px;
  width: 40px;
  left: -10px;
  top: 90px;
}

.leg {
  position: absolute;
  border-radius: 10px;
  height: 55px;
  top: 200px;
  width: 10px;
}
.leg:after {
  position: absolute;
  content: "";
  border-radius: 50%;
  height: 10px;
  left: -5px;
  top: 15px;
  width: 10px;
}
.leg .foot {
  position: absolute;
  border-radius: 25px 25px 0 0;
  height: 25px;
  left: -38px;
  top: 30px;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0