当前位置:   article > 正文

css画各种图形_css画图形

css画图形

1、Square(正方形)

 

  1. <!-- html -->
  2. <div id="square"></div>
  3. <!-- css -->
  4. #square {
  5. width: 100px;
  6. height: 100px;
  7. background: red;
  8. }

 

2、Rectangle(矩形)

 

  1. <!-- html -->
  2. <div id="rectangle"></div>
  3. <!-- css -->
  4. #rectangle {
  5. width: 200px;
  6. height: 100px;
  7. background: red;
  8. }

 

3、Circle(圆形)

 

  1. <!-- html -->
  2. <div id="circle"></div>
  3. <!-- css -->
  4. #circle {
  5. width: 100px;
  6. height: 100px;
  7. background: red;
  8. border-radius: 50px;
  9. }

 

4、Oval(椭圆形)

 

  1. <!-- html -->
  2. <div id="oval"></div>
  3. <!-- css -->
  4. #oval {
  5. width: 200px;
  6. height: 100px;
  7. background: red;
  8. border-radius: 100px / 50px;
  9. }

 

5、Egg(鸡蛋)

 

  1. <!-- html -->
  2. <div id="egg"></div>
  3. <!-- css -->
  4. #egg {
  5. display:block;
  6. width: 126px;
  7. height: 180px;
  8. background-color: red;
  9. -webkit-border-radius: 63px 63px 63px 63px / 108px 108px 72px 72px;
  10. border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  11. }

6、Trapezoid(梯形)

  1. <!-- html -->
  2. <div id="trapezoid"></div>
  3. <!-- css -->
  4. #trapezoid {
  5. border-bottom: 100px solid red;
  6. border-left: 50px solid transparent;
  7. border-right: 50px solid transparent;
  8. height: 0;
  9. width: 100px;
  10. }

 

7、Parallelogram(平行四边形)

 

  1. <!-- html -->
  2. <div id="parallelogram"></div>
  3. <!-- css -->
  4. #parallelogram {
  5. width: 120px;
  6. height: 100px;
  7. -webkit-transform: skew(20deg);
  8. -moz-transform: skew(20deg);
  9. -o-transform: skew(20deg);
  10. background: red;
  11. }

 

8、Diamond Square(菱形)

  1. <!-- html -->
  2. <div id="diamond"></div>
  3. <!-- css -->
  4. #diamond {
  5. width: 0;
  6. height: 0;
  7. border: 50px solid transparent;
  8. border-bottom-color: red;
  9. position: relative;
  10. top: -50px;
  11. }
  12. #diamond:after {
  13. content: '';
  14. position: absolute;
  15. left: -50px;
  16. top: 50px;
  17. width: 0;
  18. height: 0;
  19. border: 50px solid transparent;
  20. border-top-color: red;
  21. }

 

9、Diamond Narrow(方块)

  1. <!-- html -->
  2. <div id="diamond-narrow"></div>
  3. <!-- css -->
  4. #diamond-narrow {
  5. width: 0;
  6. height: 0;
  7. border: 50px solid transparent;
  8. border-bottom: 70px solid red;
  9. position: relative;
  10. top: -50px;
  11. }
  12. #diamond-narrow:after {
  13. content: '';
  14. position: absolute;
  15. left: -50px; top: 70px;
  16. width: 0;
  17. height: 0;
  18. border: 50px solid transparent;
  19. border-top: 70px solid red;
  20. }

10、Pentagon(五边形)

 

  1. <!-- html -->
  2. <div id="pentagon"></div>
  3. <!-- css -->
  4. #pentagon {
  5. margin: 100px;
  6. position: relative;
  7. width: 54px;
  8. border-width: 50px 18px 0;
  9. border-style: solid;
  10. border-color: red transparent;
  11. }
  12. #pentagon:before {
  13. content: "";
  14. position: absolute;
  15. height: 0;
  16. width: 0;
  17. top: -85px;
  18. left: -18px;
  19. border-width: 0 45px 35px;
  20. border-style: solid;
  21. border-color: transparent transparent red;
  22. }

 

11、Hexagon(六边形)

  1. <!-- html -->
  2. <div id="hexagon"></div>
  3. <!-- css -->
  4. #hexagon {
  5. margin: 100px;
  6. width: 100px;
  7. height: 55px;
  8. background: red;
  9. position: relative;
  10. }
  11. #hexagon:before {
  12. content: "";
  13. position: absolute;
  14. top: -25px;
  15. left: 0;
  16. width: 0;
  17. height: 0;
  18. border-left: 50px solid transparent;
  19. border-right: 50px solid transparent;
  20. border-bottom: 25px solid red;
  21. }
  22. #hexagon:after {
  23. content: "";
  24. position: absolute;
  25. bottom: -25px;
  26. left: 0;
  27. width: 0;
  28. height: 0;
  29. border-left: 50px solid transparent;
  30. border-right: 50px solid transparent;
  31. border-top: 25px solid red;
  32. }

 

12、Octagon(八边形)

  1. <!-- html -->
  2. <div id="hexagon"></div>
  3. <!-- css -->
  4. #octagon {
  5. width: 100px;
  6. height: 100px;
  7. background: red;
  8. position: relative;
  9. }
  10. #octagon:before {
  11. content: "";
  12. position: absolute;
  13. top: 0;
  14. left: 0;
  15. border-bottom: 29px solid red;
  16. border-left: 29px solid #fff;
  17. border-right: 29px solid #fff;
  18. width: 42px;
  19. height: 0;
  20. }
  21. #octagon:after {
  22. content: "";
  23. position: absolute;
  24. bottom: 0;
  25. left: 0;
  26. border-top: 29px solid red;
  27. border-left: 29px solid #fff;
  28. border-right: 29px solid #fff;
  29. width: 42px;
  30. height: 0;
  31. }

 

13、三角形

①Triangle Up(向上的三角形)

  1. <!-- html -->
  2. <div id="triangle-up"></div>
  3. <!-- css -->
  4. #triangle-up {
  5. width: 0;
  6. height: 0;
  7. border-left: 50px solid transparent;
  8. border-right: 50px solid transparent;
  9. border-bottom: 100px solid red;
  10. }

 

②Triangle Down(向下的三角形)

  1. <!-- html -->
  2. <div id="triangle-down"></div>
  3. <!-- css -->
  4. #triangle-down {
  5. width: 0;
  6. height: 0;
  7. border-left: 50px solid transparent;
  8. border-right: 50px solid transparent;
  9. border-top: 100px solid red;
  10. }

 

③Triangle Left(向左的三角形)

 

  1. <!-- html -->
  2. <div id="triangle-left"></div>
  3. <!-- css -->
  4. #triangle-left {
  5. width: 0;
  6. height: 0;
  7. border-top: 50px solid transparent;
  8. border-bottom: 50px solid transparent;
  9. border-right: 100px solid red;
  10. }

 

④Triangle Right(向右的三角形)

  1. <!-- html -->
  2. <div id="triangle-right"></div>
  3. <!-- css -->
  4. #triangle-right {
  5. width: 0;
  6. height: 0;
  7. border-top: 50px solid transparent;
  8. border-left: 100px solid red;
  9. border-bottom: 50px solid transparent;
  10. }

 

⑤Triangle Top Left(左上的三角形)

  1. <!-- html -->
  2. <div id="triangle-top-left"></div>
  3. <!-- css -->
  4. #triangle-top-left {
  5. width: 0;
  6. height: 0;
  7. border-top: 100px solid red;
  8. border-right: 100px solid transparent;
  9. }

 

⑥Triangle Top Right(右上的三角形)

  1. <!-- html -->
  2. <div id="triangle-top-right"></div>
  3. <!-- css -->
  4. #triangle-top-right {
  5. width: 0;
  6. height: 0;
  7. border-top: 100px solid red;
  8. border-left: 100px solid transparent;
  9. }

 

⑦Triangle Bottom Left(左下的三角形)

  1. <!-- html -->
  2. <div id="triangle-bottom-left"></div>
  3. <!-- css -->
  4. #triangle-bottom-left {
  5. width: 0;
  6. height: 0;
  7. border-bottom: 100px solid red;
  8. border-right: 100px solid transparent;
  9. }

 

⑧Triangle Bottom Right(右下的三角形)

  1. <!-- html -->
  2. <div id="triangle-bottom-right"></div>
  3. <!-- css -->
  4. #triangle-bottom-right {
  5. width: 0;
  6. height: 0;
  7. border-bottom: 100px solid red;
  8. border-left: 100px solid transparent;
  9. }

 

14、Star (5-points)(五角星)

  1. <!-- html -->
  2. <div id="star-five"></div>
  3. <!-- css -->
  4. #star-five {
  5. margin: 100px 0;
  6. position: relative;
  7. display: block;
  8. color: red;
  9. width: 0px;
  10. height: 0px;
  11. border-right: 100px solid transparent;
  12. border-bottom: 70px solid red;
  13. border-left: 100px solid transparent;
  14. -moz-transform: rotate(35deg);
  15. -webkit-transform: rotate(35deg);
  16. -ms-transform: rotate(35deg);
  17. -o-transform: rotate(35deg);
  18. }
  19. #star-five:before {
  20. border-bottom: 80px solid red;
  21. border-left: 30px solid transparent;
  22. border-right: 30px solid transparent;
  23. position: absolute;
  24. height: 0;
  25. width: 0;
  26. top: -45px;
  27. left: -65px;
  28. display: block;
  29. content: '';
  30. -webkit-transform: rotate(-35deg);
  31. -moz-transform: rotate(-35deg);
  32. -ms-transform: rotate(-35deg);
  33. -o-transform: rotate(-35deg);
  34. }
  35. #star-five:after {
  36. position: absolute;
  37. display: block;
  38. color: red;
  39. top: 3px;
  40. left: -105px;
  41. width: 0px;
  42. height: 0px;
  43. border-right: 100px solid transparent;
  44. border-bottom: 70px solid red;
  45. border-left: 100px solid transparent;
  46. -webkit-transform: rotate(-70deg);
  47. -moz-transform: rotate(-70deg);
  48. -ms-transform: rotate(-70deg);
  49. -o-transform: rotate(-70deg);
  50. content: '';
  51. }

 

15、Star (6-points)(六角星)

  1. <!-- html -->
  2. <div id="star-six"></div>
  3. <!-- css -->
  4. #star-six {
  5. width: 0;
  6. height: 0;
  7. border-left: 50px solid transparent;
  8. border-right: 50px solid transparent;
  9. border-bottom: 100px solid red;
  10. position: relative;
  11. }
  12. #star-six:after {
  13. width: 0;
  14. height: 0;
  15. border-left: 50px solid transparent;
  16. border-right: 50px solid transparent;
  17. border-top: 100px solid red;
  18. position: absolute;
  19. content: "";
  20. top: 30px;
  21. left: -50px;
  22. }

 

16、Diamond Shield(钻石盾牌)

  1. <!-- html -->
  2. <div id="diamond-shield"></div>
  3. <!-- css -->
  4. #diamond-shield {
  5. width: 0;
  6. height: 0;
  7. border: 50px solid transparent;
  8. border-bottom: 20px solid red;
  9. position: relative;
  10. top: -50px;
  11. }
  12. #diamond-shield:after {
  13. content: '';
  14. position: absolute;
  15. left: -50px; top: 20px;
  16. width: 0;
  17. height: 0;
  18. border: 50px solid transparent;
  19. border-top: 70px solid red;
  20. }

 

17、Cut Diamond(砖石形)

  1. <!-- html -->
  2. <div id="cut-diamond"></div>
  3. <!-- css -->
  4. #cut-diamond {
  5. border-style: solid;
  6. border-color: transparent transparent red transparent;
  7. border-width: 0 25px 25px 25px;
  8. height: 0;
  9. width: 50px;
  10. position: relative;
  11. margin: 20px 0 50px 0;
  12. }
  13. #cut-diamond:after {
  14. content: "";
  15. position: absolute;
  16. top: 25px;
  17. left: -25px;
  18. width: 0;
  19. height: 0;
  20. border-style: solid;
  21. border-color: red transparent transparent transparent;
  22. border-width: 70px 50px 0 50px;
  23. }

 

18、Cone(圆锥形)

  1. <!-- html -->
  2. <div id="cone"></div>
  3. <!-- css -->
  4. #cone {
  5. width: 0;
  6. height: 0;
  7. border-left: 70px solid transparent;
  8. border-right: 70px solid transparent;
  9. border-top: 100px solid red;
  10. -moz-border-radius: 50%;
  11. -webkit-border-radius: 50%;
  12. border-radius: 50%;
  13. }

19、Point Burst(爆炸形状)

  1. <!-- html -->
  2. <div id="point-burst"></div>
  3. <!-- css -->
  4. #point-burst {
  5. margin: 100px;
  6. background: red;
  7. width: 80px;
  8. height: 80px;
  9. position: relative;
  10. text-align: center;
  11. }
  12. #point-burst:before, #point-burst:after {
  13. content: "";
  14. position: absolute;
  15. top: 0;
  16. left: 0;
  17. height: 80px;
  18. width: 80px;
  19. background: red;
  20. }
  21. #point-burst:before {
  22. -webkit-transform: rotate(30deg);
  23. -moz-transform: rotate(30deg);
  24. -ms-transform: rotate(30deg);
  25. -o-transform: rotate(30deg);
  26. }
  27. #point-burst:after {
  28. -webkit-transform: rotate(60deg);
  29. -moz-transform: rotate(60deg);
  30. -ms-transform: rotate(60deg);
  31. -o-transform: rotate(60deg);
  32. }

 

20、Pac-Man(吃豆人)

  1. <!-- html -->
  2. <div id="pacman"></div>
  3. <!-- css -->
  4. #pacman {
  5. width: 0px;
  6. height: 0px;
  7. border-right: 60px solid transparent;
  8. border-top: 60px solid red;
  9. border-left: 60px solid red;
  10. border-bottom: 60px solid red;
  11. border-top-left-radius: 60px;
  12. border-top-right-radius: 60px;
  13. border-bottom-left-radius: 60px;
  14. border-bottom-right-radius: 60px;
  15. }

21、TV Screen(电视屏幕)

  1. <!-- html -->
  2. <div id="tv"></div>
  3. <!-- css -->
  4. #tv {
  5. margin-left: 100px;
  6. position: relative;
  7. width: 200px;
  8. height: 150px;
  9. background: red;
  10. border-radius: 50% / 10%;
  11. color: white;
  12. text-align: center;
  13. text-indent: .1em;
  14. }
  15. #tv:before {
  16. content: '';
  17. position: absolute;
  18. top: 10%;
  19. bottom: 10%;
  20. right: -5%;
  21. left: -5%;
  22. background: inherit;
  23. border-radius: 5% / 50%;
  24. }

 

22、Chevron(雪佛龙)

  1. <!-- html -->
  2. <div id="chevron"></div>
  3. <!-- css -->
  4. #chevron {
  5. position: relative;
  6. text-align: center;
  7. padding: 12px;
  8. margin-bottom: 6px;
  9. height: 60px;
  10. width: 200px;
  11. }
  12. #chevron:before {
  13. content: '';
  14. position: absolute;
  15. top: 0;
  16. left: 0;
  17. height: 100%;
  18. width: 51%;
  19. background: red;
  20. -webkit-transform: skew(0deg, 6deg);
  21. -moz-transform: skew(0deg, 6deg);
  22. -ms-transform: skew(0deg, 6deg);
  23. -o-transform: skew(0deg, 6deg);
  24. transform: skew(0deg, 6deg);
  25. }
  26. #chevron:after {
  27. content: '';
  28. position: absolute;
  29. top: 0;
  30. right: 0;
  31. height: 100%;
  32. width: 50%;
  33. background: red;
  34. -webkit-transform: skew(0deg, -6deg);
  35. -moz-transform: skew(0deg, -6deg);
  36. -ms-transform: skew(0deg, -6deg);
  37. -o-transform: skew(0deg, -6deg);
  38. transform: skew(0deg, -6deg);
  39. }

 

23、Talk Bubble(聊天框)

  1. <!-- html -->
  2. <div id="talkbubble"></div>
  3. <!-- css -->
  4. #talkbubble {
  5. margin: 100px;
  6. width: 120px;
  7. height: 80px;
  8. background: red;
  9. position: relative;
  10. -moz-border-radius: 10px;
  11. -webkit-border-radius: 10px;
  12. border-radius: 10px;
  13. }
  14. #talkbubble:before {
  15. content:"";
  16. position: absolute;
  17. right: 100%;
  18. top: 26px;
  19. width: 0;
  20. height: 0;
  21. border-top: 13px solid transparent;
  22. border-right: 26px solid red;
  23. border-bottom: 13px solid transparent;
  24. }

 

24、Magnifying Glass(放大镜)

  1. <!-- html -->
  2. <div id="magnifying-glass"></div>
  3. <!-- css -->
  4. #magnifying-glass{
  5. font-size: 10em; /* This controls the size. */
  6. display: inline-block;
  7. width: 0.4em;
  8. height: 0.4em;
  9. border: 0.1em solid red;
  10. position: relative;
  11. border-radius: 0.35em;
  12. }
  13. #magnifying-glass::before{
  14. content: "";
  15. display: inline-block;
  16. position: absolute;
  17. right: -0.25em;
  18. bottom: -0.1em;
  19. border-width: 0;
  20. background: red;
  21. width: 0.35em;
  22. height: 0.08em;
  23. -webkit-transform: rotate(45deg);
  24. -moz-transform: rotate(45deg);
  25. -ms-transform: rotate(45deg);
  26. -o-transform: rotate(45deg);
  27. }

 

25、Heart(心形)

  1. <!-- html -->
  2. <div id="heart"></div>
  3. <!-- css -->
  4. #heart {
  5. position: relative;
  6. width: 100px;
  7. height: 90px;
  8. }
  9. #heart:before,
  10. #heart:after {
  11. position: absolute;
  12. content: "";
  13. left: 50px;
  14. top: 0;
  15. width: 50px;
  16. height: 80px;
  17. background: red;
  18. -moz-border-radius: 50px 50px 0 0;
  19. border-radius: 50px 50px 0 0;
  20. -webkit-transform: rotate(-45deg);
  21. -moz-transform: rotate(-45deg);
  22. -ms-transform: rotate(-45deg);
  23. -o-transform: rotate(-45deg);
  24. transform: rotate(-45deg);
  25. -webkit-transform-origin: 0 100%;
  26. -moz-transform-origin: 0 100%;
  27. -ms-transform-origin: 0 100%;
  28. -o-transform-origin: 0 100%;
  29. transform-origin: 0 100%;
  30. }
  31. #heart:after {
  32. left: 0;
  33. -webkit-transform: rotate(45deg);
  34. -moz-transform: rotate(45deg);
  35. -ms-transform: rotate(45deg);
  36. -o-transform: rotate(45deg);
  37. transform: rotate(45deg);
  38. -webkit-transform-origin: 100% 100%;
  39. -moz-transform-origin: 100% 100%;
  40. -ms-transform-origin: 100% 100%;
  41. -o-transform-origin: 100% 100%;
  42. transform-origin :100% 100%;
  43. }

 

 26、Infinity(无限符图形)

  1. <!-- html -->
  2. <div id="infinity"></div>
  3. <!-- css -->
  4. #infinity {
  5. position: relative;
  6. width: 212px;
  7. height: 100px;
  8. }
  9. #infinity:before,
  10. #infinity:after {
  11. content: "";
  12. position: absolute;
  13. top: 0;
  14. left: 0;
  15. width: 60px;
  16. height: 60px;
  17. border: 20px solid red;
  18. -moz-border-radius: 50px 50px 0 50px;
  19. border-radius: 50px 50px 0 50px;
  20. -webkit-transform: rotate(-45deg);
  21. -moz-transform: rotate(-45deg);
  22. -ms-transform: rotate(-45deg);
  23. -o-transform: rotate(-45deg);
  24. transform: rotate(-45deg);
  25. }
  26. #infinity:after {
  27. left: auto;
  28. right: 0;
  29. -moz-border-radius: 50px 50px 50px 0;
  30. border-radius: 50px 50px 50px 0;
  31. -webkit-transform: rotate(45deg);
  32. -moz-transform: rotate(45deg);
  33. -ms-transform: rotate(45deg);
  34. -o-transform: rotate(45deg);
  35. transform: rotate(45deg);
  36. }

 

 27、Yin Yang(阴阳八卦)

  1. <!-- html -->
  2. <div id="yin-yang"></div>
  3. <!-- css -->
  4. #yin-yang {
  5. width: 96px;
  6. height: 48px;
  7. background: #eee;
  8. border-color: red;
  9. border-style: solid;
  10. border-width: 2px 2px 50px 2px;
  11. border-radius: 100%;
  12. position: relative;
  13. }
  14. #yin-yang:before {
  15. content: "";
  16. position: absolute;
  17. top: 50%;
  18. left: 0;
  19. background: #eee;
  20. border: 18px solid red;
  21. border-radius: 100%;
  22. width: 12px;
  23. height: 12px;
  24. }
  25. #yin-yang:after {
  26. content: "";
  27. position: absolute;
  28. top: 50%;
  29. left: 50%;
  30. background: red;
  31. border: 18px solid #eee;
  32. border-radius:100%;
  33. width: 12px;
  34. height: 12px;
  35. }

 

28、 Badge Ribbon(徽章丝带)

  1. <!-- html -->
  2. <div id="badge-ribbon"></div>
  3. <!-- css -->
  4. #badge-ribbon {
  5. position: relative;
  6. background: red;
  7. height: 100px;
  8. width: 100px;
  9. -moz-border-radius: 50px;
  10. -webkit-border-radius: 50px;
  11. border-radius: 50px;
  12. }
  13. #badge-ribbon:before,
  14. #badge-ribbon:after {
  15. content: '';
  16. position: absolute;
  17. border-bottom: 70px solid red;
  18. border-left: 40px solid transparent;
  19. border-right: 40px solid transparent;
  20. top: 70px;
  21. left: -10px;
  22. -webkit-transform: rotate(-140deg);
  23. -moz-transform: rotate(-140deg);
  24. -ms-transform: rotate(-140deg);
  25. -o-transform: rotate(-140deg);
  26. }
  27. #badge-ribbon:after {
  28. left: auto;
  29. right: -10px;
  30. -webkit-transform: rotate(140deg);
  31. -moz-transform: rotate(140deg);
  32. -ms-transform: rotate(140deg);
  33. -o-transform: rotate(140deg);
  34. }

 

 29、Space Invader(太空入侵者)

  1. <!-- html -->
  2. <div id="space-invader"></div>
  3. <!-- css -->
  4. #space-invader{
  5. box-shadow:
  6. 0 0 0 1em red,
  7. 0 1em 0 1em red,
  8. -2.5em 1.5em 0 .5em red,
  9. 2.5em 1.5em 0 .5em red,
  10. -3em -3em 0 0 red,
  11. 3em -3em 0 0 red,
  12. -2em -2em 0 0 red,
  13. 2em -2em 0 0 red,
  14. -3em -1em 0 0 red,
  15. -2em -1em 0 0 red,
  16. 2em -1em 0 0 red,
  17. 3em -1em 0 0 red,
  18. -4em 0 0 0 red,
  19. -3em 0 0 0 red,
  20. 3em 0 0 0 red,
  21. 4em 0 0 0 red,
  22. -5em 1em 0 0 red,
  23. -4em 1em 0 0 red,
  24. 4em 1em 0 0 red,
  25. 5em 1em 0 0 red,
  26. -5em 2em 0 0 red,
  27. 5em 2em 0 0 red,
  28. -5em 3em 0 0 red,
  29. -3em 3em 0 0 red,
  30. 3em 3em 0 0 red,
  31. 5em 3em 0 0 red,
  32. -2em 4em 0 0 red,
  33. -1em 4em 0 0 red,
  34. 1em 4em 0 0 red,
  35. 2em 4em 0 0 red;
  36. background: red;
  37. width: 1em;
  38. height: 1em;
  39. overflow: hidden;
  40. margin: 100px;
  41. }

 

 30、Facebook Icon(Facebook图标)

  1. <!-- html -->
  2. <div id="facebook-icon"></div>
  3. <!-- css -->
  4. #facebook-icon {
  5. background: red;
  6. text-indent: -999em;
  7. width: 100px;
  8. height: 110px;
  9. border-radius: 5px;
  10. position: relative;
  11. overflow: hidden;
  12. border: 15px solid red;
  13. border-bottom: 0;
  14. }
  15. #facebook-icon::before {
  16. content: "/20";
  17. position: absolute;
  18. background: red;
  19. width: 40px;
  20. height: 90px;
  21. bottom: -30px;
  22. right: -37px;
  23. border: 20px solid #eee;
  24. border-radius: 25px;
  25. }
  26. #facebook-icon::after {
  27. content: "/20";
  28. position: absolute;
  29. width: 55px;
  30. top: 50px;
  31. height: 20px;
  32. background: #eee;
  33. right: 5px;
  34. }

 

 31、Moon(月亮)

  1. <!-- html -->
  2. <div id="moon"></div>
  3. <!-- css -->
  4. #moon {
  5. width: 80px;
  6. height: 80px;
  7. border-radius: 50%;
  8. box-shadow: 15px 15px 0 0 red;
  9. }

 

 32、Cross(十字架)

  1. <!-- html -->
  2. <div id="cross"></div>
  3. <!-- css -->
  4. #cross {
  5. background: red;
  6. height: 100px;
  7. position: relative;
  8. width: 20px;
  9. margin: 100px;
  10. }
  11. #cross:after {
  12. background: red;
  13. content: "";
  14. height: 20px;
  15. left: -40px;
  16. position: absolute;
  17. top: 40px;
  18. width: 100px;
  19. }

 

 33、Curved Tail Arrow(弯尾箭头)

  1. <!-- html -->
  2. <div id="curvedarrow"></div>
  3. <!-- css -->
  4. #curvedarrow {
  5. margin: 100px;
  6. position: relative;
  7. width: 0;
  8. height: 0;
  9. border-top: 9px solid transparent;
  10. border-right: 9px solid red;
  11. -webkit-transform: rotate(10deg);
  12. -moz-transform: rotate(10deg);
  13. -ms-transform: rotate(10deg);
  14. -o-transform: rotate(10deg);
  15. }
  16. #curvedarrow:after {
  17. content: "";
  18. position: absolute;
  19. border: 0 solid transparent;
  20. border-top: 3px solid red;
  21. border-radius: 20px 0 0 0;
  22. top: -12px;
  23. left: -9px;
  24. width: 12px;
  25. height: 12px;
  26. -webkit-transform: rotate(45deg);
  27. -moz-transform: rotate(45deg);
  28. -ms-transform: rotate(45deg);
  29. -o-transform: rotate(45deg);
  30. }

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/97006
推荐阅读
相关标签
  

闽ICP备14008679号