css实现皮卡丘布局效果

代码语言:html

所属分类:布局界面

代码描述:css实现皮卡丘布局效果

代码标签: 布局 效果

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
/*#FAD61D pikachu 
#E19720 shadow
#F62D14 pokeball
#811E09 shadow*/

.container {
  margin:auto;
  top:0;
  right:0;
  bottom:0;
  left:0;
  width:100vw;
  height:100vh;
}

body {
  background: #3b4cca;
}

.pokeball-top {
  background-color: white;
  width: 300px; 
  height: 150px; 
  border: 5px solid black;
  border-radius: 150px 150px 0 0;
  position: absolute; 
  top: 130px; 
  left: 300px;
}

.pokeball-bottom {
  background-color: red;
  width: 300px; 
  height: 150px; 
  border: 5px solid black;
  border-radius: 0 0 150px 150px;
  position: absolute; 
  top: 290px; 
  left: 300px;
}

.btn {
  background: white; 
  width: 50px; 
  height: 50px; 
  border: 6px solid black; 
  border-radius: 50%; 
  position: relative; 
  top: -25px; 
  left: 120px; 
}

.btn:after {
  background: white; 
  content: "";
  width: 25px; 
  height: 25px; 
  border: 5px solid black; 
  border-radius: 50%; 
  position: absolute; 
  top: 7px; 
  left: 8px; 
}

.left-ear {
  background: #FAD61D;
  width: 100px; 
  height: 100px; 
  border: 5px solid black; 
  border-radius: 100px 0; 
  position: absolute; 
  left: 210px;
  top: -70px;
  z-index: -1;
}

.left-tip {
  background: black; 
  width: 50px;
  height: 50px; 
  border-radius: 0 50px 45px 50px;
  position: absolute; 
  top: -65px;
  left: -5px;
}

.left-tip1 {
  background: black; 
  width: 31px;
  height: 65px;
  position: absolute; 
  top: -64px; 
  left: 11px;
  border-radius: 20px 0 0 20px;
  transform: rotate(35deg);
}

.right-ear {
  background: #FAD61D;
  width: 100px; 
  height: 100px; 
  border: 5px solid black; 
  border-radius: 0 100px; 
  position: absolute; 
  left: -10px;
  top: -70px;
  z-index: -1;
}

.right-tip {
  background: black; 
  width: 50px;
  height: 50px; 
  border-radius: 50px 0 45px 50px;
  position: absolute; 
  top: -65px;
  left: 265px;
}

.right-tip1 {
  background: black; 
  width: 31px;
  height: 65px;
  position: absolute; 
  top: -64px; 
  left: 265px;
  border-radius: 20px 0 0 20px;
  transform: rotate(139deg);
 
}

.left-eye {
  background: black; 
  width: 40px;
  height: 40px; 
  border-radius: 50%;
  position: relative; 
  top: 45px;
  left: 70px;
}

.left-eye:after {
  background: white; 
  content: ""; 
  width: 15px; 
  height: 15px; 
  border-radius: 50%; 
  position: absolute; 
  top: 5px; 
  left: 8px; 
}

.right-eye {
  background: black;
  width: 40px; 
  height: 40px; 
  border-radius: 50%; 
  position: absolute; 
  top: 45px;
  left: 195px; 
}

.right-eye:after {
  .........完整代码请登录后点击上方下载按钮下载查看

网友评论0