e 1 anno fa
parent
commit
4bf5cb4be5
3 ha cambiato i file con 142 aggiunte e 0 eliminazioni
  1. 27 0
      css3/1.浏览器的内核.html
  2. 50 0
      css3/2.样式.html
  3. 65 0
      css3/3.奥运五环.html

+ 27 - 0
css3/1.浏览器的内核.html

@@ -0,0 +1,27 @@
+<!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>
+        #box {
+            width: 200px;
+            height: 200px;
+            background: #00f;
+            border-radius: 50%;
+            /* 谷歌浏览器 */
+            -webkit-border-radius: 50%;
+            /* 火狐浏览器 */
+            -moz-border-radius: 50%;
+            /* IE浏览器 */
+            -ms-border-radius: 50%;
+            /* 欧鹏浏览器 */
+            -o-border-radius:50%;
+        }
+    </style>
+</head>
+<body>
+    <div id="box"></div>
+</body>
+</html>

+ 50 - 0
css3/2.样式.html

@@ -0,0 +1,50 @@
+<!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>
+        #box {
+            width: 200px;
+            height: 200px;
+            background: #ff0;
+            margin: 100px auto;
+            /* 
+                box-shadow:左右 上下 阴影模糊程度 颜色;
+            */
+            box-shadow: 100px 140px 10px #f00;
+        }
+        p {
+            font-size: 40px;
+            font-weight: bold;
+            color: blue;
+            /* 
+                text-shadow:左右 上下 阴影模糊程度 颜色;
+            */
+            text-shadow: 100px 20px 3px #ff0;
+        }
+        #max {
+            width: 300px;
+            height: 300px;
+            border:1px solid #000;
+            margin: 100px auto;
+            /* 超出一行显示省略号 */
+            /* 移除隐藏 */
+            overflow: hidden;
+            /* 强制不换行 */
+            white-space: nowrap;
+            /* 显示省略号 */
+            text-overflow: ellipsis;
+        }
+    </style>
+</head>
+<body>
+    <div id="box"></div>
+    <p>我是一个文字</p>
+    <div id="max">
+        我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字
+        我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字我是一段文字
+    </div>
+</body>
+</html>

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

@@ -0,0 +1,65 @@
+<!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;
+        }
+        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;
+            /* transparent 透明 */
+            border-bottom-color: transparent;
+        }
+        #yellow {
+            border-color: yellow;
+            top: 0;
+            left: 235px;
+        }
+        #blue {
+            border-color: blue;
+            top: 0;
+            left: 470px;
+        }
+        #green {
+            border-color: green;
+            top: 115px;
+            left: 110px;
+        }
+        #black {
+            border-color: black;
+            top: 115px;
+            left: 360px;
+        }
+    </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>