4_奥运五环.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. <style>
  9. div{
  10. width: 200px;
  11. height: 200px;
  12. border-radius: 50%;
  13. /* border-color: #000; */
  14. border-style: solid;
  15. border-width: 10px;
  16. position: absolute;
  17. }
  18. #blue{
  19. border-color: blue;
  20. left: 0;
  21. top: 0;
  22. }
  23. div::after{
  24. content: '';
  25. position: absolute;
  26. width: 200px;
  27. height: 200px;
  28. border-radius: 50%;
  29. /* border-style: solid;
  30. border-width: 10px; */
  31. /* border-color: blueviolet; */
  32. top: -10px;
  33. left: -10px;
  34. }
  35. #blue::after{
  36. border: 10px solid blue;
  37. z-index: 1;
  38. border-bottom-color: transparent;
  39. }
  40. #black{
  41. border-color: black;
  42. left: 230px;
  43. top: 0;
  44. }
  45. #black::after{
  46. border: 10px solid black;
  47. z-index: 1;
  48. border-left-color: transparent;
  49. }
  50. #red{
  51. border-color: red;
  52. left: 460px;
  53. top: 0;
  54. }
  55. #red::after{
  56. border: 10px solid red;
  57. z-index: 1;
  58. border-left-color: transparent;
  59. }
  60. #yellow{
  61. border-color: yellow;
  62. left: 110px;
  63. top: 110px;
  64. }
  65. #green{
  66. border-color: green;
  67. left: 340px;
  68. top: 110px;
  69. }
  70. #green::after{
  71. border: 10px solid green;
  72. z-index: 1;
  73. border-top-color: transparent;
  74. border-right-color:transparent;
  75. }
  76. </style>
  77. </head>
  78. <body>
  79. <div id="blue"></div>
  80. <div id="black"></div>
  81. <div id="red"></div>
  82. <div id="yellow"></div>
  83. <div id="green"></div>
  84. </body>
  85. </html>