css布局实现胡桃夹子效果代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现胡桃夹子效果代码

代码标签: css 布局 胡桃 夹子

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">

  
<style>
.container {
  background: radial-gradient(ellipse at center, #e05565 0%, #9d0e2b 100%);
  position: absolute;
  height: 100%;
  width: 100%;
}

.wrapper {
  left: calc(50% - 75px);
  position: absolute;
  top: calc(50% - (329px / 2));
}

.helmet {
  background: #000;
  border-bottom: 20px solid #ffd700;
  border-radius: 50px 50px 0 0;
  height: 150px;
}

.diamond {
  background-color: #ffd700; 
  height: 50px;    
  margin: auto;
  position: relative;
  top: 50px;
  transform: rotate(45deg) skew(20deg, 20deg);
  width: 50px;
}

.face {
  background-color: #e8913a;
  border-radius: 0 0 10px 10px;
  padding: 10px 10px 0;
  position: relative;
  width: 145px;
  z-index: 100;
}

.eye {
  background-color: #fff;
  border-radius: 40px;
  border-top: 10px solid #000;
  display: inline-block;
  margin-left: 5px;
  position: relative;
  height: 40px;
  width: 40px;
}

.eye:before,
.eye:after {
  border-radius: 100%;
  content: "";
  display: block;
  left: 25%;
  position: absolute;
  top: 25%;
}

.eye:after {
  background-color: #000;
  height: 20px;
  width: 20px;
}

.left,
.right {
  position: absolute;
}

.right {
  right: 15px;
}

.cheek {
  background-color: #db6868;
  border-radius: 50px;
  height: 40px;
  margin-left: 5px;
  position: absolute;
  width: 40px;
}

.nose .........完整代码请登录后点击上方下载按钮下载查看

网友评论0