zoukankan      html  css  js  c++  java
  • CSS 各种形状

    制作圆形:

    要使用CSS来制作一个圆形,我们需要一个div,被给它设置一个ID

    <div id="circle"></div> 

    圆形在设置CSS时要设置宽度和高度相等,然后设置border-radius属性为宽度或高度的一半即可:

    #circle {

         120px;

        height: 120px;

        background: #7fee1d;

        -moz-border-radius: 60px;

        -webkit-border-radius: 60px;

        border-radius: 60px;

    CSS3制作各种形状图像

    制作椭圆形:

    椭圆形是正圆形的一个变体,同样使用一个带ID的div来制作

    <div id="oval"></div>  

    设置椭圆形的CSS时,高度要设置为宽度的一半,border-radius属性也要做相应的改变:

    #oval {

         200px;

        height: 100px;

        background: #e9337c;

        -webkit-border-radius: 100px / 50px;

        -moz-border-radius: 100px / 50px;

        border-radius: 100px / 50px;

    CSS3制作各种形状图像

    制作三角形:

    要创建一个CSS三角形,需要使用border,通过设置不同边的透明效果,我们可以制作出三角形的现状。另外,在制作三角形时,宽度和高度要设置为0。

    <div id="triangle"></div>  

                               

    #triangle {

         0;

        height: 0;

        border-bottom: 140px solid #fcf921;

        border-left: 70px solid transparent;

        border-right: 70px solid transparent;

    }   

    CSS3制作各种形状图像

    制作倒三角形:

    与正三角形不同的是,倒三角形要设置的是border-top、border-left和border-right三条边的属性:

    #triangle {

         0;

        height: 0;

        border-top: 140px solid #20a3bf;

        border-left: 70px solid transparent;

        border-right: 70px solid transparent;

    1. 制作左三角形:
    2. 左三角形操作的是border-top、border-left和border-right三条边的属性,其中上边和下边要设置透明属性。
    3. #triangle_left {
    4.      0;
    5.     height: 0;
    6.     border-top: 70px solid transparent;
    7.     border-right: 140px solid #6bbf20;
    8.     border-bottom: 70px solid transparent;
    9. }  
    10. 6

      制作菱形

      制作菱形的方法有很多种。这里使用的是transform属性和rotate相结合,使两个正反三角形上下显示。

      #diamond {

           120px;

          height: 120px;

          background: #1eff00;

      /* Rotate */

          -webkit-transform: rotate(-45deg);

          -moz-transform: rotate(-45deg);

          -ms-transform: rotate(-45deg);

          -o-transform: rotate(-45deg);

          transform: rotate(-45deg);

      /* Rotate Origin */

          -webkit-transform-origin: 0 100%;

          -moz-transform-origin: 0 100%;

          -ms-transform-origin: 0 100%;

          -o-transform-origin: 0 100%;

          transform-origin: 0 100%;

          margin: 60px 0 10px 310px;

    11. 7

      制作梯形:

      梯形是三角形的一个变体,设置CSS梯形时,左右两条边设置为相等,并且给它设置一个宽度。

      #trapezium {

          height: 0;

           120px;

          border-bottom: 120px solid #ec3504;

          border-left: 60px solid transparent;

          border-right: 60px solid transparent;

    12. 8

      制作平行四边形:

      平行四边形的制作方式是使用transform属性使长方形倾斜一个角度。

      #parallelogram {

           160px;

          height: 100px;

          background: #8734f7;

          -webkit-transform: skew(30deg);

          -moz-transform: skew(30deg);

          -o-transform: skew(30deg);

          transform: skew(30deg);

      }  

    13. 9

      星形:

      星形的HTML结构同样使用一个带ID的空div。星形的实现方式比较复杂,主要是使用transform属性来旋转不同的边。仔细体会下面的代码。

      #star {

          0;

          height: 0;

          margin: 50px 0;

          color: #fc2e5a;

          position: relative;

          display: block;

          border-right: 100px solid transparent;

          border-bottom: 70px solid #fc2e5a;

          border-left: 100px solid transparent;

          -moz-transform: rotate(35deg);

          -webkit-transform: rotate(35deg);

          -ms-transform: rotate(35deg);

          -o-transform: rotate(35deg);

      }

        

      #star:before {

          height: 0;

          0;

          position: absolute;

          display: block;

          top: -45px;

          left: -65px;

          border-bottom: 80px solid #fc2e5a;

          border-left: 30px solid transparent;

          border-right: 30px solid transparent;

          content: '';

          -webkit-transform: rotate(-35deg);

          -moz-transform: rotate(-35deg);

          -ms-transform: rotate(-35deg);

          -o-transform: rotate(-35deg);

      }

        

      #star:after {

          content: '';

          0;

          height: 0;

          position: absolute;

          display: block;

          top: 3px;

          left: -105px;

          color: #fc2e5a;

          border-right: 100px solid transparent;

          border-bottom: 70px solid #fc2e5a;

          border-left: 100px solid transparent;

          -webkit-transform: rotate(-70deg);

          -moz-transform: rotate(-70deg);

          -ms-transform: rotate(-70deg);

          -o-transform: rotate(-70deg);

      }                              

    14. 10

      六角星形:

      和五角星的制作方法不同,六角星形状的制作方法是操纵border属性来制作两半图形,然后合并它们。

      #star_six_points {

           0;

          height: 0;

          display: block;

          position: absolute;

          border-left: 50px solid transparent;

          border-right: 50px solid transparent;

          border-bottom: 100px solid #de34f7;

          margin: 10px auto;

      }

        

      #star_six_points:after {

          content: "";

           0;

          height: 0;

          position: absolute;

          border-left: 50px solid transparent;

          border-right: 50px solid transparent;

          border-top: 100px solid #de34f7;

          margin: 30px 0 0 -50px;

      }                             

    15. 11

       六边形:

      六边形的制作方法可以有很多种,可以像五边形一样,先制作一个长方形,然后在它的上面和下面各放置一个三角形。

      #hexagon {

          100px;

          height: 55px;

          background: #fc5e5e;

          position: relative;

          margin: 10px auto;

      }

        

      #hexagon:before {

          content: "";

          0;

          height: 0;

          position: absolute;

          top: -25px;

          left: 0;

          border-left: 50px solid transparent;

          border-right: 50px solid transparent;

          border-bottom: 25px solid #fc5e5e;

      }

        

      #hexagon:after {

          content: "";

          0;

          height: 0;

          position: absolute;

          bottom: -25px;

          left: 0;

          border-left: 50px solid transparent;

          border-right: 50px solid transparent;

          border-top: 25px solid #fc5e5e;

      }                              

    16. 12

      心形:

      心形的制作是非常复杂的,可以使用伪元素来制作,分别将伪元素旋转不同的角度,并修改transform-origin属性来元素的旋转中心点。

      #heart {

          position: relative;

      }

        

      #heart:before,#heart:after {

          content: "";

          70px;

          height: 115px;

          position: absolute;

          background: red;

          left: 70px;

          top: 0;

          -webkit-border-radius: 50px 50px 0 0;

          -moz-border-radius: 50px 50px 0 0;

          border-radius: 50px 50px 0 0;

          -webkit-transform: rotate(-45deg);

          -moz-transform: rotate(-45deg);

          -ms-transform: rotate(-45deg);

          -o-transform: rotate(-45deg);

          transform: rotate(-45deg);

          -webkit-transform-origin: 0 100%;

          -moz-transform-origin: 0 100%;

          -ms-transform-origin: 0 100%;

          -o-transform-origin: 0 100%;

          transform-origin: 0 100%;

      }

        

      #heart:after {

          left: 0;

          -webkit-transform: rotate(45deg);

          -moz-transform: rotate(45deg);

          -ms-transform: rotate(45deg);

          -o-transform: rotate(45deg);

          transform: rotate(45deg);

          -webkit-transform-origin: 100% 100%;

          -moz-transform-origin: 100% 100%;

          -ms-transform-origin: 100% 100%;

          -o-transform-origin: 100% 100%;

          transform-origin: 100% 100%;

      }                              

    17. 13

      蛋形:

      蛋形时椭圆形的一个变体,它的高度要比宽度稍大,并且设置正确的border-radius属性即可以制作出一个蛋形。

      #egg {

           136px;

          height: 190px;

          background: #ffc000;

          display: block;

          -webkit-border-radius: 63px 63px 63px 63px / 108px 108px 72px 72px;

          border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;

      }   

    18. 14

      无穷符号:

      无穷符号可以通过border属性和设置伪元素的角度来实现。

      #infinity {

          220px;

          height: 100px;

          position: relative;

      }

        

      #infinity:before,#infinity:after {

          content: "";

          60px;

          height: 60px;

          position: absolute;

          top: 0;

          left: 0;

          border: 20px solid #06c999;

          -moz-border-radius: 50px 50px 0;

          border-radius: 50px 50px 0 50px;

          -webkit-transform: rotate(-45deg);

          -moz-transform: rotate(-45deg);

          -ms-transform: rotate(-45deg);

          -o-transform: rotate(-45deg);

          transform: rotate(-45deg);

      }

        

      #infinity:after {

          left: auto;

          right: 0;

          -moz-border-radius: 50px 50px 50px 0;

          border-radius: 50px 50px 50px 0;

          -webkit-transform: rotate(45deg);

          -moz-transform: rotate(45deg);

          -ms-transform: rotate(45deg);

          -o-transform: rotate(45deg);

          transform: rotate(45deg);

      }                              

      1. 15
      2. 消息提示框:
      3. 消息提示框可以先制作一个圆角矩形,然后在需要的地方放置一个三角形。
      4. #comment_bubble {
      5.     140px;
      6.     height: 100px;
      7.     background: #088cb7;
      8.     position: relative;
      9.     -moz-border-radius: 12px;
      10.     -webkit-border-radius: 12px;
      11.     border-radius: 12px;
      12. }
      13.   
      14. #comment_bubble:before {
      15.     content: "";
      16.     0;
      17.     height: 0;
      18.     right: 100%;
      19.     top: 38px;
      20.     position: absolute;
      21.     border-top: 13px solid transparent;
      22.     border-right: 26px solid #088cb7;
      23.     border-bottom: 13px solid transparent;
      24. }                              
      CSS3制作各种形状图像

    --------------------------------------------------------------------------------------------------------------------------------------------

    ****************************************************************************************************

    border-bottom:24px solid #F00;
    border-right:24px solid transparent;
    border-top:24px solid #F00;
    border-left:24px solid transparent;

    以前以为border是个中规中矩的长方形,我们可以看出来其实border的图片并不是中规中矩的长方形.而是梯形的结构

    利用这一原理就可以制作出斜方向的不规则图片如

    代码如下:
    border-bottom:24px solid #F00;
    border-right:24px solid transparent;(宽度存在但是为透明)

     
    理解css结构,border设置宽度就意味着自身的高度要设置为0,才能保证他在同一行中。

    如图未设置高度为0时

    设置height:0时

    大家也可以自己尝试一下,

    借此也可以更好的理解css3.0中的伪类after,before来构造不规则的图片!避免使用了较大的图片。

    *****************************************************************************************************

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title></title>
    <style>
    body{ background: #161616;}
    .frame{  100%; min- 420px;}
    .frame li{ float:left;  100px; height: 100px;  margin: 1px; background: #1c1c1c; list-style: none; padding: 50px;}
    .square{  100px; height: 100px; background: #fff;}
    .square-round-one{  100px; height: 100px; background: #fff; -webkit-border-top-left-radius: 50%; border-top-left-radius: 50%;}
    .square-round-two{  100px; height: 100px; background:#fff; -webkit-border-radius: 50% 0 50% 0;border-radius: 50% 0 50% 0;}
    .square-round-three{  100px; height: 100px; background:#fff; -webkit-border-radius: 50% 0 50% 50%;border-radius: 50% 0 50% 50%;}
    .square-round-half{  100px; height: 100px; background: #fff; -webkit-border-radius: 0 50% 50% 0;border-radius: 0 50% 50% 0;}
    .circle{  100px; height: 100px; background: #fff; -webkit-border-radius: 50%; border-radius:50%;}
    .diamond{  100px; height: 100px; background:#fff; -webkit-transform: rotate(45deg); transform: rotate(45deg); -webkit-border-radius: 5%;border-radius: 5%;}
    .diamond-cut{border-color:transparent transparent #fff transparent; border-0 25px 25px 25px; border-style: solid; position: relative;}
    .diamond-cut::after{content: "";border-color:#fff transparent transparent transparent;border-style: solid;border-75px 50px 0 50px ;position: absolute; top: 25px; left: -25px;}
    .rhombus{ border-color:transparent transparent #fff  transparent; border-style: solid; border-50px; border-bottom-70px; border-top- 0; position: relative; top:-30px;}
    .rhombus::after{ content: ""; border-color:#fff transparent transparent transparent; border-style: solid; border-50px; border-top-70px; border-bottom-0; position: absolute;top:70px; left:-50px;}
    .trapezoid{  100px; margin-left:-35px ; border-bottom: 70px solid #fff; border-left: 35px solid transparent; border-right: 35px solid transparent;}
    .pentagon{  70px; position:relative; top:40px; left:0px;border-top: 50px solid #fff; border-left: 18px solid transparent; border-right:18px solid transparent;}
    .pentagon::after{ content: ""; border-color: transparent transparent #fff; border-style: solid;  border- 0 55px 50px;  position: absolute; top:-100px; left:-20px;}
    .hexagon{  100px; height: 50px; background: #fff; position: relative; margin-top: 25px;}
    .hexagon::before{  content: ""; border-color: transparent transparent #fff; border-style: solid; border- 0 50px 35px; position: absolute; top:-35px;  }
    .hexagon::after{ content: ""; border-color: #fff transparent transparent; border-style: solid; border-35px 50px 0; position: absolute; top:50px;} 
    .octagon{  100px; height: 50px; background: #fff; position: relative; margin-top: 25px;}		
    .octagon::before{content: ""; height:0px; 50px; position:absolute; margin-top: -25px; border-bottom: 25px solid #fff;border-left:25px solid #1c1c1c; border-right:25px solid #1c1c1c; }	
    .octagon::after{ content:""; height: 0;  50px; position: absolute; margin-top: 50px; border-top: 25px solid #fff; border-left: 25px solid #1c1c1c; border-right: 25px solid #1c1c1c;}
    .rectangle{  100px; height: 50px; margin-top: 20px; background:#fff;}
    .parallelogram-left{  100px; height: 50px; margin-top: 20px; background:#fff; -webkit-transform: skew(20deg); transform: skew(20deg);}
    .parallelogram-right{  100px; height: 50px; margin-top: 20px; background: #fff; -webkit-transform: skew(-20deg); transform: skew(-20deg);}
    .heart{  100px; height: 100px; position: relative; margin-left: -10px;}
    .heart::before,.heart::after{ content: "";  60px; height: 100px; background:#ff6666; position: absolute; top:0; left:60px; border-radius: 50px 50px 0 0;-webkit-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: 0 100%; transform-origin: 0 100%;}
    .heart::after{ position:absolute; left:20px; top:-40px;-webkit-transform: rotate(45deg); transform: rotate(45deg); -webkit-transform-origin: 0 100%; transform-origin: 0 100%; }
    .triangle{  0; border-color: transparent transparent #fff; border-style: solid; border- 0 50px 100px; }
    .triangle-down{  0; border-color: #fff transparent transparent; border-style: solid; border- 100px 50px 0;}
    .triangle-left{  0; border-color: transparent #fff transparent transparent ; border-style: solid; border- 50px 100px 50px 0;}
    .triangle-right{  0; border-color: transparent transparent transparent #fff; border-style: solid; border- 50px 0 50px 100px;}
    .triangle-left-top{  0; border-color: #fff transparent transparent #fff; border-style: solid; border- 50px; }
    .triangle-right-top{  0; border-color:#fff #fff transparent transparent; border-style: solid; border-50px;}
    .triangle-left-bottom{ border-color: transparent transparent #fff #fff; border-style: solid; border- 50px;}
    .triangle-right-bottom{ border-color: transparent #fff #fff transparent; border-style: solid; border- 50px;}
    .arrow-up{  0; border-color: transparent transparent #fff; border-style: solid; border- 0 45px 50px; position: relative; margin-top: -5px; margin-left: 10px;}
    .arrow-up::after{ content: "";  35px; height: 70px; background: #fff; position: absolute; top: 30px; left: -18px;}
    .arrow-down{  0; border-color: #fff transparent transparent; border-style: solid; border- 50px; position: relative; top:50px;}
    .arrow-down::after{ content: "";  35px; height: 70px; background: #fff; position: absolute; bottom:25px; left:-18px;}
    .arrow-left{  0; border-color: transparent #fff transparent transparent; border-style: solid; border- 50px; position: relative;right:60px;} 
    .arrow-left::after{ content: "";  75px; height:35px; background: #fff; position: absolute; top: -17px; left: 25px;}
    .arrow-right{  0; border-color: transparent transparent transparent #fff; border-style: solid; border- 50px; position: relative; left: 60px;}
    .arrow-right::after{ content: "";  75px; height: 35px; background:#fff; position: absolute; top: -17px; right:25px ;}
    .circle-spin-half{  60px; height: 60px; background: transparent; border-color: transparent transparent #fff #fff; border-style: solid; border- 20px; border-radius: 50%; -webkit-animation:circle-spin-half 1.2s linear infinite; animation:circle-spin-half 1.2s linear infinite;}
    @-webkit-keyframes circle-spin-half{
    	0%{-webkit-transform: rotate(0deg);} 
    	100%{-webkit-transform: rotate(360deg);}
    }
    @keyframes circle-spin-half{
    	0%{transform: rotate(0deg);} 
    	100%{transform: rotate(360deg);}
    }
    .oval{  100px; height:50px; border-radius: 50%; background:#fff; margin-top: 20px;}
    .circle-half-top{  100px; height:50px; background:#fff; border-radius: 100px 100px 0 0;}
    .circle-half-bottom{  100px; height: 50px; background: #fff; border-radius: 0 0 100px 100px; margin-top: 50px;}
    .circle-half-left{  50px; height: 100px; background: #fff; border-radius: 100px 0 0 100px;}
    .circle-half-right{  50px; height: 100px; background: #fff; border-radius: 0 100px 100px 0; margin-left: 50px;}
    .circle-left-top{  100px; height: 100px; background:#fff; border-top-left-radius:100%;}
    .circle-right-top{  100px; height: 100px; background: #fff; border-top-right-radius: 100%;}
    .circle-left-bottom{  100px; height: 100px; background: #fff; border-bottom-left-radius: 100%;}
    .circle-right-bottom{  100px; height: 100px; background: #fff; border-bottom-right-radius: 100%;}
    .circle-quarter-left-top{  border-color: #fff transparent transparent transparent; border-style: solid; border- 100px; border-radius: 100%; margin-left:-50px;}
    .circle-quarter-right-top{ border-color: transparent #fff transparent transparent; border-style: solid; border- 100px;  border-radius: 100%; margin-left: -100px; margin-top: -50px;}
    .circle-quarter-bottom{ border-color: transparent transparent #fff; border-style: solid; border-0 100px 100px; border-radius: 100%; margin-left: -50px;}
    .circle-quarter-left{ border-color:transparent transparent transparent #fff; border-style: solid; border- 80px 0 80px 100px; border-radius: 100%; margin-top: -35px;}
    .circle-wedge-top{border-color: transparent #fff #fff; border-style: solid; border- 50px; border-radius: 100%;}
    .circle-wedge-right{ border-color: #fff transparent #fff #fff; border-style: solid; border- 50px; border-radius: 100%;}
    .circle-wedge-bottom{ border-color: #fff #fff transparent #fff; border-style: solid; border- 50px; border-radius: 100%;}
    .circle-wedge-left{ border-color: #fff #fff #fff transparent; border-style: solid; border- 50px; border-radius: 100%;}
    .flower{  100px; height: 100px; background: #fff; border-radius:20%;}
    .flower::before{ content: "";  100px; height: 100px; background: #fff; border-radius: 20%; position: absolute; -webkit-transform: rotate(45deg); transform: rotate(45deg);}
    /*用定位是把添加的元素转化成块级元素,也可以使用display:block;*/
    .star-six{  0; border-color: transparent transparent #fff; border-style: solid; border-0 50px 80px; position: relative;}
    .star-six::after{ content: ""; border-color:#fff transparent transparent; border-style: solid; border- 80px 50px 0; position: absolute; left: -50px; top: 25px;}
    .star-eight{border-color: #fff transparent #fff transparent; border-style: solid; border- 20px; margin-top: 30px; position: relative;}
    .star-eight::after{ content: ""; border-color:transparent #fff transparent #fff;border-style: solid; border- 20px; position: absolute; height: 60px; top:-50px; left: 10px; }
    .star-twelve{  100px; height: 100px; background: #fff; position: relative;}
    .star-twelve::before,.star-twelve::after{ content:""; 100px; height: 100px; background: #fff; position: absolute; -webkit-transform: rotate(30deg); transform: rotate(30deg);}
    .star-twelve::after{ -webkit-transform: rotate(-30deg);transform: rotate(-30deg);}
    .cross{  35px; height: 100px; background: #fff; position: relative; margin-left: 30px; -webkit-transform: rotate(45deg); transform: rotate(45deg); }
    .cross::after{ content: "";  35px; height: 100px; background: #fff; position: absolute; -webkit-transform: rotate(-90deg); transform: rotate(-90deg);}
    .cross-round{background: #ffffff; 33px;height: 100px;position: relative;margin-left: 33px;border-radius: 20px;-webkit-transform: rotate(45deg);transform: rotate(45deg);}
    .cross-round:before {background: #ffffff;content: ""; 100px;height: 33px;position: absolute;top: 33px;left: -33px;border-radius: 20px;}
    /*两个cross cross-round 两个方式不同,宽高是相反的*/
    .plus{  33px; height: 100px; background: #fff; position: relative; left: 33px;}
    .plus::after{ content: "";  100px; height: 33px; background: #fff; position: absolute; top: 33px; left: -33px;}
    .plus-round{  33px; height: 100px; background: #fff; border-radius: 20px; margin-left: 33px; position: relative;}
    .plus-round::after{ content: "";  100px; height: 33px; background: #fff; border-radius: 20px; position: absolute; left: -33px; top:33px;}
    .search{  35px; height: 35px; border-radius: 50%;border:8px solid #fff; position:relative; margin-left: 20px; margin-top: 20px;}
    .search::after{ 10px; height:30px; content: ""; background: #fff; position: absolute;top:25px; left: 40px; -webkit-transform: rotate(-45deg); transform: rotate(-45deg);}
    .map-pin{  30px; height:30px; border:15px solid #fff; border-radius: 50%; margin-left:20px; margin-top: 10px; position: relative;}
    .map-pin::after{ content: "";border-color:#fff transparent transparent; border-style: solid; border-35px 25px 0; position: absolute; top:32px; left: -10px;}
    .callout{  100px; height:50px;background: #fff; border-radius: 10px; position: relative; margin-top:20px;}
    .callout::after{ content: ""; border-color: transparent #fff transparent transparent; border-style: solid; border-10px 15px 10px 0; position: absolute; left:-15px; top:15px;}
    .yinyang{  96px; height: 48px; border: 2px solid #fff; border-radius: 50%; background: #000; border- 2px 2px 50px 2px; position: relative;-webkit-animation: circle-spin-half 1.2s linear infinite; animation: circle-spin-half 1.2s linear infinite;}
    .yinyang::before{ content: ""; position: absolute;  12px; height: 12px; background: #000;  border-radius: 50%; top:50%;left:0; border: 18px solid #fff;}
    .yinyang::after{ content: ""; position: absolute;  12px; height: 12px; background: #fff; border-radius: 50%;border:18px solid #000; left:50%; top: 50%; }
    .iphone{ 40px; height: 60px; border- 15px 5px; border-color:#fff; border-style: solid; border-radius: 5px; position: relative; margin-left: 20px; margin-top:10px;}
    .iphone::before{ content: ""; position: absolute;  15px; height: 5px; background: #000; top:-10px; left:13px;}
    .iphone::after{ content: ""; position: absolute;  10px; height: 10px; border-radius: 50%; background: #000; bottom:-13px;left: 14px;}
    .bookmark{ 0; height: 70px; border-left: 25px solid #fff; border-right: 25px solid #fff; border-bottom: 25px solid transparent; margin-left: 25px;}
    .battery{ 50px; height: 30px; background: #fff; position: relative; margin-top: 20px;}
    .battery::after{ content: ""; position: absolute; top:-15px; left:-15px;  80px; height: 50px; border: 5px solid #fff; border-radius: 5px;}
    .battery::before{ content: ""; position: absolute;  10px; height: 15px; border: 5px solid #fff; border-radius: 5px; right:-40px; top:5px;}
    .eye{  70px; height: 70px; position: relative; background: #fff; border-radius: 50% 0 50% 0; -webkit-transform: rotate(45deg); transform: rotate(45deg);}
    .eye::after{ content: ""; position: absolute;  20px; height: 20px; background: #fff; border-radius: 50%; border:10px solid #000; top:15px; left: 15px;}
    </style>
    </head>
    <body>
    
    <div class="frame">
    	<ul>
    		<li><div class="square"></div></li>
    		<li><div class="square-round-one"></div></li>
    		<li><div class="square-round-two"></div></li>
    		<li><div class="square-round-three"></div></li>
    		<li><div class="square-round-half"></div></li>
    		<li><div class="circle"></div></li>
    		<li><div class="diamond"></div></li>
    		<li><div class="diamond-cut"></div></li>
    		<li><div class="rhombus"></div></li>
    		<li><div class="trapezoid"></div></li>
    		<li><div class="pentagon"></div></li>
    		<li><div class="hexagon"></div></li>
    		<li><div class="octagon"></div></li>
    		<li><div class="rectangle"></div></li>
    		<li><div class="parallelogram-left"></div></li>
    		<li><div class="parallelogram-right"></div></li>
    		<li><div class="heart"></div></li>
    		<li><div class="triangle"></div></li>
    		<li><div class="triangle-down"></div></li>
    		<li><div class="triangle-left"></div></li>
    		<li><div class="triangle-right"></div></li>
    		<li><div class="triangle-left-top"></div></li>
    		<li><div class="triangle-right-top"></div></li>
    		<li><div class="triangle-left-bottom"></div></li>
    		<li><div class="triangle-right-bottom"></div></li>
    		<li><div class="arrow-up"></div></li>	
    		<li><div class="arrow-down"></div></li>
    		<li><div class="arrow-left"></div></li>
    		<li><div class="arrow-right"></div></li>
    		<li><div class="circle-spin-half"></div></li>
    		<li><div class="oval"></div></li>
    		<li><div class="circle-half-top"></div></li>
    		<li><div class="circle-half-bottom"></div></li>
    		<li><div class="circle-half-left"></div></li>
    		<li><div class="circle-half-right"></div></li>
    		<li><div class="circle-left-top"></div></li>
    		<li><div class="circle-right-top"></div></li>
    		<li><div class="circle-left-bottom"></div></li>
    		<li><div class="circle-right-bottom"></div></li>
    		<li><div class="circle-quarter-left-top"></div></li>
    		<li><div class="circle-quarter-right-top"></div></li>
    		<li><div class="circle-quarter-bottom"></div></li>
    		<li><div class="circle-quarter-left"></div></li>
    		<li><div class="circle-wedge-top"></div></li>
    		<li><div class="circle-wedge-right"></div></li>
    		<li><div class="circle-wedge-bottom"></div></li>
    		<li><div class="circle-wedge-left"></div></li>
    		<li><div class="flower"></div></li>
    		<li><div class="star-six"></div></li>
    		<li><div class="star-eight"></div></li>
    		<li><div class="star-twelve"></div></li>
    		<li><div class="cross"></div></li>
    		<li><div class="cross-round"></div></li>
    		<li><div class="plus"></div></li>
    		<li><div class="plus-round"></div></li>
    		<li><div class="search"></div></li>
    		<li><div class="map-pin"></div></li>
    		<li><div class="callout"></div></li>
    		<li><div class="yinyang"></div></li>
    		<li><div class="iphone"></div></li>
    		<li><div class="bookmark"></div></li>
    		<li><div class="battery"></div></li>
    		<li><div class="eye"></div></li>
    	</ul>
    	<div style="clear: both;"></div>
    </div>	
    
    	
    </body>
    </html>
    

      

  • 相关阅读:
    iOS中Zbar二维码扫描的使用
    SOJ 1135. 飞跃原野
    SOJ 1048.Inverso
    SOJ 1219. 新红黑树
    SOJ 1171. The Game of Efil
    SOJ 1180. Pasting Strings
    1215. 脱离地牢
    1317. Sudoku
    SOJ 1119. Factstone Benchmark
    soj 1099. Packing Passengers
  • 原文地址:https://www.cnblogs.com/xiangxiong/p/7009062.html
Copyright © 2011-2022 走看看