e 1 rok temu
rodzic
commit
81f9b19fa6
1 zmienionych plików z 76 dodań i 0 usunięć
  1. 76 0
      css3/3.奥运五环.html

+ 76 - 0
css3/3.奥运五环.html

@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Document</title>
+    <style>
+        div {
+            width: 200px;
+            height: 200px;
+            border-radius: 50%;
+            border-width: 10px;
+            border-style: solid;
+            position: absolute;
+            /* border: 1px solid #f00; */
+            /* background-color: #000; */
+        }
+        div::after {
+            content: "";
+            width: 200px;
+            height: 200px;
+            border-radius: 50%;
+            position: absolute;
+            top: -10px;
+            left:-10px;
+        }
+        #red {
+            border-color: red;
+            top: 0;
+            left: 0;
+        }
+        #red::after {
+            z-index: 99;
+            border:10px solid #f00;
+            border-bottom-color: transparent;
+        }
+        #yellow {
+            border-color: yellow;
+            top: 0;
+            left: 230px;
+        }
+        #yellow::after {
+            z-index: 1;
+            border: 10px solid #ff0;
+            border-bottom-color: transparent;
+        }
+        #blue {
+            border-color: blue;
+            top: 0;
+            left: 460px;
+        }
+        #blue::after {
+            z-index: 1;
+            border: 10px solid #00f;
+            border-left-color: transparent;
+        }
+        #green {
+            border-color: green;
+            top: 120px;
+            left: 110px;
+        }
+        #black {
+            border-color: black;
+            top: 120px;
+            left: 340px;
+        }
+    </style>
+</head>
+<body>
+    <div id="red"></div>
+    <div id="yellow"></div>
+    <div id="blue"></div>
+    <div id="green"></div>
+    <div id="black"></div>
+</body>
+</html>