用css3实现了一个tp的logo,不是100%像

jerry 2015年11月18日 收藏
火狐下效果好,ie圆角不兼容
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta charset="utf-8">
  5.         <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6.         <title>tp_logo</title>
  7.         <meta name="description" content="">
  8.         <meta name="keywords" content="">
  9.         <style type="text/css">
  10.             .border{border: 1px solid #000;width:200px;margin: 0 auto}
  11.             #logo,#left,#right,#bottom{width: 200px;height: 200px;}
  12.             #logo{
  13.                 background-color: #84C255;
  14.                 border-top-left-radius:30px;
  15.                 border-bottom-right-radius:30px; 
  16.                 overflow: hidden;
  17.                 position: relative; 
  18.             }
  19.             #left{ 
  20.                 transform:rotate(45deg);
  21.                 left: -140px;
  22.                 background-color: #6FB737;
  23.                 position: absolute;
  24.             }
  25.             #right{
  26.                 transform:rotate(45deg);
  27.                 right: -140px;
  28.                 background-color: #6FB737;
  29.                 position: absolute;
  30.             }
  31.             #bottom{
  32.                 transform:rotate(45deg);
  33.                 top: 140px;
  34.                 background-color: #5E9C2F;
  35.                 position: absolute;
  36.             }
  37.             .line{
  38.                 position: relative;
  39.                 border-left: 38px solid white;
  40.                 width: 40px;
  41.                 height: 70px;
  42.                 border-bottom-left-radius: 78px 60px;
  43.             }
  44.             .right{transform:rotate(-120deg);}
  45.             .left{transform:rotate(60deg);}
  46.             #line1_right{
  47.                 top:20px;
  48.                 left: -28px;
  49.             }
  50.             #line1_left{
  51.                 top:19px;
  52.                 left: -68px;
  53.             }
  54.             #line2_right{
  55.                 top:-70px;
  56.                 left: 10px;
  57.             }
  58.             #line2_left{
  59.                 top:-71px;
  60.                 left: -30px;
  61.             }    
  62.             #line3_right{
  63.                 top:-160px;
  64.                 left: 48px;
  65.             }
  66.             #line3_left{
  67.                 top:-161px;
  68.                 left: 10px;
  69.             }    
  70.         </style>
  71.     </head>
  72.     <body>
  73.         <center class="border">
  74.             <div id="logo">
  75.                 <div id="left"></div>
  76.                 <div id="right"></div>
  77.                 <div id="bottom"></div>
  78.                 <div class="line right" id="line1_right"></div>
  79.                 <div class="line left" id="line1_left"></div>
  80.                 <div class="line right" id="line2_right"></div>
  81.                 <div class="line left" id="line2_left"></div>
  82.                 <div class="line right" id="line3_right"></div>
  83.                 <div class="line left" id="line3_left"></div>
  84.             </div>
  85.         </center>
  86.     </body>
  87. </html>