用CSS3手工绘制的新浪微博图标

yaozheng   发布于 2016年07月14日   阅读次数: 190   我想说两句

Tag: css3 新浪微博

<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content=text/html; charset=utf-8 />
<title>小新头像-新浪CDC</title>
</head>
<style>
.sina{ margin:60px 0 0 22px;}
.head{ position:relative; width:195px; height:220px;} 
.head_bg{ position:absolute; width:200px; height:175px; background:#ab2b41; left:6px; z-index:6;
-moz-border-radius-topleft:200px 180px;
-moz-border-radius-topright: 200px 180px;
-moz-border-radius-bottomleft: 200px 180px;
-moz-border-radius-bottomright: 200px 180px;
-webkit-border-radius:200px 180px;
-moz-transform: rotate(-6deg);
-webkit-transform:rotate(-6deg);
-moz-box-shadow:1px 4px 3px #333;
-webkit-box-shadow:1px 4px 3px #333;
border:1px solid #c03461;
}

.head_top{  position:absolute; top:-3px; left:5px; width:197px; height:167px;z-index:7;
-moz-border-radius-topleft:200px 180px;
-moz-border-radius-topright:200px 180px;
-moz-border-radius-bottomleft:200px 180px;
-moz-border-radius-bottomright:200px 180px;
-webkit-border-radius:200px 180px;
-moz-transform:rotate(-6deg); 
-webkit-transform:rotate(-6deg);
background: -moz-linear-gradient(left top, #e16591, #ce3551 50%);
background: -webkit-gradient(linear, 0 0, 0 50%, from(#e16591), to(#ce3551));
}

.head_shadow{ position:absolute; width:190px; height:162px;  top:2px; left:10px; z-index:8;
-moz-border-radius-topleft:200px 180px;
-moz-border-radius-topright:200px 180px;
-moz-border-radius-bottomleft:200px 180px;
-moz-border-radius-bottomright:200px 180px;
-webkit-border-radius:200px 180px;
background: -moz-linear-gradient(left top, white, #ce3552 50%);
background: -webkit-gradient(linear, left top, 10% 50%, from(#fff), to(#ce3552));
}

.head_a1{ width:54px; height:45px; position:absolute; top:-24px; right:32px;background:#d53960; z-index:5;
border:1px solid #c03461;
-moz-border-radius:180px 0;
-webkit-border-radius:180px 0 180px 0;
-moz-transform: rotate(-6deg);
-webkit-transform:rotate(-6deg); 
-moz-box-shadow:4px 4px 0px #c03461;
-webkit-box-shadow:4px 4px 0px #c03461;
}

.head_a1 .top{width:100px; height:100px; position:absolute; top:-80px; right:-11px; background:#fff; z-index:1;
-moz-border-radius:135px;
-webkit-border-radius:135px;
}

.head_a1 .body{width:23px; height:23px; position:absolute; top:-10px; right:-3px; background:#d53960; z-index:2;
-moz-border-radius:135px 135px 135px 0;
-webkit-border-top-left-radius:135px;
-webkit-border-top-right-radius:135px;
-webkit-border-bottom-right-radius:135px;
-webkit-border-bottom-left-radius:0;

-moz-transform: rotate(-60deg);
-webkit-transform: rotate(-60deg);
-moz-box-shadow:3px 4px 0px #c03461;
-webkit-box-shadow:3px 4px 0px #c03461;
}

.head_a1 .shadow{width:19px; height:19px; position:absolute; top:-8px; right:-2px; z-index:3;
-moz-border-radius:135px 135px 135px 0;
-webkit-border-radius:135px 135px 135px 0;
-moz-transform: rotate(-60deg);
-webkit-transform: rotate(-60deg);
background: -moz-linear-gradient(top, white, #ce3552 50%);
background: -webkit-gradient(linear, left top, 0 50%, from(#fff), to(#ce3552));
}

.head_a2{ width:60px; height:45px; position:absolute; top:-22px; right:-13px;background:#d53960; z-index:4;
border:1px solid #c03461;
-moz-border-radius:180px 0;
-webkit-border-radius:180px 0 180px 0;
-moz-transform: rotate(-10deg);
-webkit-transform: rotate(-10deg);
-moz-box-shadow:4px 4px 0px #c03461;
-webkit-box-shadow:4px 4px 0px #c03461;
}

.head_a2 .top{width:40px; height:38px; position:absolute; top:-12px; right:7px; background:#fff; z-index:1;
-moz-border-radius:180px 0 180px 0;
-webkit-border-radius:180px 0 180px 0;
-moz-transform: rotate(20deg);
-webkit-transform: rotate(20deg);
}

.head_a2 .body{width:23px; height:23px; position:absolute; top:-10px; right:-3px; background:#d53960; z-index:2;
-moz-border-radius:135px 135px 135px 0;
-webkit-border-radius:135px 135px 135px 0;
-moz-transform: rotate(-60deg);
-webkit-transform: rotate(-60deg);
-moz-box-shadow:3px 4px 0px #c03461;
-webkit-box-shadow:3px 4px 0px #c03461;
}

.head_a2 .shadow{width:19px; height:19px; position:absolute; top:-8px; right:-1px; z-index:3;
-moz-border-radius:135px 135px 135px 0;
-webkit-border-radius:135px 135px 135px 0;
-moz-transform: rotate(-60deg);
-webkit-transform: rotate(-60deg);
background: -moz-linear-gradient(top, white, #ce3552 50%);
background: -webkit-gradient(linear, left top, 0 50%, from(#fff), to(#ce3552));
}

.head_a3{ width:80px; height:47px; position:absolute; top:6px; right:-46px;background:#d53960; z-index:3;
border:1px solid #c03461;
-moz-border-radius:100px 0 110px 0;
-webkit-border-radius:100px 0 110px 0;
-moz-transform: rotate(-10deg);
-webkit-transform: rotate(-10deg);
-moz-box-shadow:4px 4px 0px #c03461;
-webkit-box-shadow:4px 4px 0px #c03461;
}

.head_a3 .top{width:67px; height:38px; position:absolute; top:-18px; right:15px; background:#fff; z-index:1;
-moz-border-radius:180px 0 180px 0;
-webkit-border-radius:180px 0 180px 0;
-moz-transform: rotate(40deg);
-webkit-transform: rotate(40deg);
}
.head_a3 .body{width:23px; height:23px; position:absolute; top:-8px; right:-1px; background:#d53960; z-index:2;
-moz-border-radius:135px 135px 135px 0;
-webkit-border-radius:135px 135px 135px 0;
-moz-transform: rotate(-72deg);
-webkit-transform: rotate(-72deg);
-moz-box-shadow:3px 4px 0px #c03461;
-webkit-box-shadow:3px 4px 0px #c03461;
}

.head_a3 .shadow{width:19px; height:19px; position:absolute; top:-6px; right:0px; z-index:3;
-moz-border-radius:135px 135px 135px 0;
-webkit-border-radius:135px 135px 135px 0;
-moz-transform: rotate(-60deg);
-webkit-transform: rotate(-60deg);
background: -moz-linear-gradient(top, white, #ce3552 50%);
background: -webkit-gradient(linear, left top, 0 50%, from(#fff), to(#ce3552));
}

.head_a4{ width:80px; height:47px; position:absolute; top:44px; right:-55px; background:#d53960; z-index:2;
border:1px solid #c03461;
-moz-border-radius:80px 0 110px 0;
-webkit-border-radius:80px 0 110px 0;
-moz-transform: rotate(8deg);
-webkit-transform: rotate(8deg);
-moz-box-shadow:4px 4px 0px #c03461;
-webkit-box-shadow:4px 4px 0px #c03461;
}

.head_a4 .top{width:67px; height:38px;position:absolute; top:-18px; right:13px; background:#fff; z-index:1;
-moz-border-radius:180px 0 180px 0;
-webkit-border-radius:180px 0 180px 0;
-moz-transform: rotate(40deg);
-webkit-transform: rotate(40deg);
}

.head_a4 .body{width:23px; height:23px; position:absolute; top:-9px; right:-2px; background:#d53960; z-index:2;
-moz-border-radius:135px 135px 135px 0;
-webkit-border-radius:135px 135px 135px 0;
-moz-transform: rotate(-70deg);
-webkit-transform: rotate(-70deg);
-moz-box-shadow:3px 4px 0px #c03461;
-webkit-box-shadow:3px 4px 0px #c03461;
}
.head_a4 .shadow{width:19px; height:19px; position:absolute; top:-7px; right:-1px; z-index:3;
-moz-border-radius:135px 135px 135px 0;
-webkit-border-radius:135px 135px 135px 0;
-moz-transform: rotate(-70deg);
-webkit-transform: rotate(-70deg);
background: -moz-linear-gradient(top, white, #ce3552 50%);
background: -webkit-gradient(linear, left top, 0 50%, from(#fff), to(#ce3552));
}

.head_a5{ width:54px; height:45px; position:absolute; top:87px; right:-45px; background:#d53960; z-index:1;
border:1px solid #c03461;
-moz-border-radius:135px 0 180px 0;
-webkit-border-radius:135px 0 180px 0;
-moz-transform: rotate(35deg);
-webkit-transform: rotate(35deg);
-moz-box-shadow:4px 4px 0px #c03461;
-webkit-box-shadow:4px 4px 0px #c03461;
}
.head_a5 .top{width:100px; height:100px; position:absolute; top:-78px; right:-7px; background:#fff; z-index:1;
-moz-border-radius:135px;
-webkit-border-radius:135px;
}
.head_a5 .body{width:23px; height:23px; position:absolute; top:-6px; right:0px; background:#d53960; z-index:2;
-moz-border-radius:135px 135px 135px 0;
-webkit-border-radius:135px;
-moz-transform: rotate(-70deg);
-webkit-transform: rotate(-70deg);
-moz-box-shadow:3px 4px 0px #c03461;
-webkit-box-shadow:3px 4px 0px #c03461;
}
.head_a5 .shadow{width:19px; height:19px; position:absolute; top:-4px; right:2px; z-index:3;
-moz-border-radius:135px 135px 135px 0;
-webkit-border-radius:135px 135px 135px 0;
-moz-transform: rotate(-70deg);
-webkit-transform: rotate(-70deg);
background: -moz-linear-gradient(top, white, #ce3552 50%);
background: -webkit-gradient(linear, left top, 0 50%, from(#fff), to(#ce3552));
}

.eye{ position:absolute; top:47px; left:27px; width:161px; height:88px; z-index:10;
-moz-transform: rotate(-2deg);
-webkit-transform: rotate(-2deg);
}

.eye1{ position:absolute; top:57px; left:59px; width:8px; height:8px; background:#fff; z-index:5;
-moz-border-radius:180px;
-webkit-border-radius:180px;
}
.eye2{ position:absolute; top:29px; left:81px; width:22px; height:22px; background:#fff; z-index:4;
-moz-border-radius:180px;
-webkit-border-radius:180px;
}
.eye3{ position:absolute; top:25px; left:56px; width:47px; height:47px; background:#000; z-index:3;
-moz-border-radius:180px;
-webkit-border-radius:180px;
}
.eye4{ position:absolute; top:14px; left:46px; width:67px; height:67px; border:1px solid #312613; background:#66383d; z-index:2;
-moz-border-radius:180px;
-webkit-border-radius:180px;
-moz-box-shadow:0px 0px 5px #000;
-webkit-box-shadow:0px 0px 5px #000;
}
.eye5{ position:absolute; top:1px; left:8px; width:137px; height:86px; background:#fff; z-index:1;
border-top:5px solid #999;border-left:5px solid #999;
-moz-border-radius:300px 30px 300px 30px;
-webkit-border-radius:300px 30px 300px 30px;
-moz-transform: rotate(20deg);
-webkit-transform: rotate(20deg);
-moz-box-shadow:0px -7px 0 #ec9dc2;
-webkit-box-shadow:0px -7px 0 #ec9dc2;}

</style>

<body>
<div class=sina>
  <div class=head>
    <div class=head_bg></div>
    <div class=head_top></div>
    <div class=head_shadow></div>

    <div class=head_a1>
      <div class=top></div>
      <div class=body></div>
      <div class=shadow></div>
    </div>
    <div class=head_a2>
      <div class=top></div>
      <div class=body></div>
      <div class=shadow></div>
    </div>
    <div class=head_a3>
      <div class=top></div>
      <div class=body></div>
      <div class=shadow></div>
    </div>
    <div class=head_a4>
      <div class=top></div>
      <div class=body></div>
      <div class=shadow></div>
    </div>
    <div class=head_a5>
      <div class=top></div>
      <div class=body></div>
      <div class=shadow></div>
   </div>
   
    <div class=eye>
      <div class=eye1></div>
      <div class=eye2></div>
      <div class=eye3></div>
      <div class=eye4></div>
      <div class=eye5></div>
    </div>


  </div>


</div>
</body>
</html>