css3.0 图型组成案例训练1

日期:2021-03-10 类型:科技新闻 

关键词:h5平台,手机端网页,手机端网页模板,免费的h5场景制作平台,h5制作工具

html一部分內容

拷贝编码
编码以下:

<div class="header">
  <div class="eye_left"></div>
  <div class="eye_right">
    <div class="eye_in"></div>
  </div>
  <div class="head_bottom"></div>
</div>

css一部分

拷贝编码
编码以下:

*{ padding:0; margin:0;}
.header{ width:300px; margin:100px auto; position:relative; }
.eye_left,.eye_right{
  width:30px;
  height:30px;
  background:#FFF;
  position:absolute;
  border:70px solid #0C0;
  border-radius:160px;
  -moz-border-radius:160px;
  -webkit-border-radius:160px;
  -o-border-radius:160px;}
.eye_left{
  left:10px;
  top:0px;}
.eye_right{
  right:0px;
  top:0px;}
.head_bottom{
  width:200px;
  border:#0C0 solid 60px;
  border-radius:160px;
  -moz-border-radius:160px;
  -webkit-border-radius:160px;
  -o-border-radius:160px;
  height:30px;
  left:0px;
  position:absolute;
  top:120px;
  z-index:⑸;}
.eye_in{
  background:#0C0;
  height:30px;
  width:30px;
  position:absolute;
  right:⑶0px;
  top:⑶0px;
  border:#FFF 30px solid;
  border-radius:160px;
  -moz-border-radius:160px;
  -webkit-border-radius:160px;
  -o-border-radius:160px;}