{"id":35732,"date":"2025-05-06T17:15:21","date_gmt":"2025-05-06T09:15:21","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/35732.html"},"modified":"2025-05-06T17:15:21","modified_gmt":"2025-05-06T09:15:21","slug":"css%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/35732.html","title":{"rendered":"CSS\u5b66\u4e60\u7b14\u8bb0"},"content":{"rendered":"<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"240\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091519-6819d327a5eb4.png\" width=\"240\" \/><\/p>\n<\/p>\n<p>CSS&#xff08;Cascading Style Sheets&#xff09;&#xff0c;\u4e2d\u6587\u540d\u4e3a\u7ea7\u8054\u6837\u5f0f\u8868&#xff0c;\u4e5f\u6709\u79f0\u4e3a\u5c42\u53e0\u6837\u5f0f\u8868&#xff0c;\u5c42\u53e0\u5c31\u662f\u6837\u5f0f\u53ef\u4ee5\u5c42\u5c42\u53e0\u52a0&#xff0c;\u53ef\u4ee5\u5bf9\u4e00\u4e2a\u5143\u7d20\u591a\u6b21\u8bbe\u7f6e\u6837\u5f0f&#xff0c;\u540e\u9762\u5b9a\u4e49\u7684\u6837\u5f0f\u4f1a\u5bf9\u524d\u9762\u5b9a\u4e49\u7684\u6837\u5f0f\u8fdb\u884c\u91cd\u5199\u3002 CSS\u662f\u4e00\u79cd\u7528\u6765\u8868\u73b0HTML&#xff08;\u6807\u51c6\u901a\u7528\u6807\u8bb0\u8bed\u8a00\u7684\u4e00\u4e2a\u5e94\u7528&#xff09;\u6216XML&#xff08;\u6807\u51c6\u901a\u7528\u6807\u8bb0\u8bed\u8a00\u7684\u4e00\u4e2a\u5b50\u96c6&#xff09;\u7b49\u6587\u4ef6\u6837\u5f0f\u7684\u8ba1\u7b97\u673a\u8bed\u8a00\u3002<\/p>\n<h3>CSS\u7684\u5f15\u5165<\/h3>\n<h6>\u884c\u5185\u5f0f<\/h6>\n<p>\u4e5f\u53eb\u5185\u8054\u5f0f&#xff0c;\u884c\u5185\u5f0f\u80fd\u5feb\u901f\u4e3a\u5355\u4e2a\u5143\u7d20\u6dfb\u52a0\u72ec\u7279\u6837\u5f0f&#xff0c;\u4f8b\u5982\u4e3a\u4e00\u6bb5\u6587\u672c\u8bbe\u7f6e\u7279\u5b9a\u7684\u5b57\u4f53\u989c\u8272\u3001\u5b57\u53f7\u548c\u5bf9\u9f50\u65b9\u5f0f&#xff0c;\u6216\u4e3a\u4e00\u4e2a\u6309\u94ae\u8bbe\u7f6e\u80cc\u666f\u989c\u8272\u3001\u8fb9\u6846\u6837\u5f0f\u7b49\u3002\u6bd4\u5982<\/p>\n<p>&lt;p style&#061;&#034;font-size:20px;color:blue;text-align:center;&#034;&gt;\u884c\u5185\u5f0f&lt;\/p&gt; <\/p>\n<h6>\u5185\u5d4c\u5f0f<\/h6>\n<p>\u5c06CSS\u4ee3\u7801\u96c6\u4e2d\u5728&lt;head&gt; &lt;\/head&gt; \u4e4b\u95f4<\/p>\n<p>&lt;head&gt;<br \/>\n      &lt;style&gt;<br \/>\n             p{<br \/>\n              color:red;<br \/>\n              font-size:20px;<br \/>\n              text-align:center;<br \/>\n              }<br \/>\n      &lt;\/style&gt;<br \/>\n&lt;\/head&gt; <\/p>\n<h6>\u94fe\u5165\u5f0f<\/h6>\n<p>\u94fe\u5165\u5f0f\u662f\u5c06\u6240\u6709\u7684\u6837\u5f0f\u653e\u5728\u4e00\u4e2a\u6216\u591a\u4e2a\u4ee5<span style=\"color:#fe2c24\">.css<\/span>\u4e3a\u6269\u5c55\u540d\u7684\u5916\u90e8\u6837\u5f0f\u8868\u6587\u4ef6\u4e2d&#xff0c;\u901a\u8fc7&lt;link \/&gt;\u6807\u7b7e\u5c06\u5916\u90e8\u6837\u5f0f\u8868\u6587\u4ef6\u94fe\u63a5\u5230HTML\u6587\u6863\u7684&lt;head&gt;&lt;\/head&gt;\u4e2d.<\/p>\n<p>&lt;head&gt;<br \/>\n    &lt;link href&#061;&#034;CSS\u6587\u4ef6\u7684\u8def\u5f84&#034; type&#061;&#034;text\/css&#034; rel&#061;&#034;stylesheet&#034; \/&gt;<br \/>\n&lt;\/head&gt; <\/p>\n<h6>\u5bfc\u5165\u5f0f<\/h6>\n<p>\u5f53\u4e00\u4e2a\u7f51\u7ad9\u6709\u591a\u4e2a\u9875\u9762&#xff0c;\u4e14\u8fd9\u4e9b\u9875\u9762\u90fd\u9700\u8981\u4f7f\u7528\u4e00\u4e9b\u5171\u540c\u7684\u57fa\u7840\u6837\u5f0f\u65f6&#xff0c;\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u57fa\u7840\u6837\u5f0f\u5199\u5728\u4e00\u4e2a\u5916\u90e8 CSS \u6587\u4ef6\u4e2d&#xff0c;\u7136\u540e\u901a\u8fc7\u5bfc\u5165\u5f0f\u5728\u5404\u4e2a\u9875\u9762\u4e2d\u5f15\u5165\u3002\u6bd4\u5982\u4e00\u4e2a\u7535\u5546\u7f51\u7ad9&#xff0c;\u6240\u6709\u9875\u9762\u90fd\u6709\u76f8\u540c\u7684\u5bfc\u822a\u680f\u6837\u5f0f\u3001\u9875\u811a\u6837\u5f0f\u7b49&#xff0c;\u5c31\u53ef\u4ee5\u628a\u8fd9\u4e9b\u6837\u5f0f\u5b9a\u4e49\u5728common.css\u6587\u4ef6\u4e2d &#xff0c;\u5728\u6bcf\u4e2a\u9875\u9762\u7684 HTML \u4ee3\u7801\u7684&lt;head&gt;\u6807\u7b7e\u5185\u4f7f\u7528\u5bfc\u5165\u5f0f\u5f15\u5165&#xff1a;<\/p>\n<p>&lt;style type&#061;&#034;text\/css&#034;&gt;<br \/>\n      &#064;import url(&#034;common.css&#034;);<br \/>\n&lt;\/style&gt; <\/p>\n<h5>\u5bfc\u5165\u5f0f\u548c\u94fe\u5165\u5f0f\u7684\u533a\u522b<\/h5>\n<p>\u94fe\u5165\u5f0f\u662f\u901a\u8fc7&lt;link \/&gt;\u6807\u7b7e\u5c06\u5916\u90e8\u6837\u5f0f\u8868\u6587\u4ef6\u94fe\u63a5\u5230 HTML \u6587\u6863\u4e2d&#xff0c;\u5b83\u4f1a\u5728\u7f51\u9875\u6587\u4ef6\u4e3b\u4f53\u88c5\u8f7d\u524d\u88c5\u8f7d CSS \u6587\u4ef6&#xff0c;\u800c\u5bfc\u5165\u5f0f\u4f1a\u5728\u6574\u4e2a\u7f51\u9875\u88c5\u8f7d\u5b8c\u540e\u518d\u88c5\u8f7d CSS \u6587\u4ef6 \u3002\u8fd9\u5c31\u5bfc\u81f4\u5982\u679c\u7f51\u9875\u6bd4\u8f83\u5927&#xff0c;\u5bfc\u5165\u5f0f\u53ef\u80fd\u4f1a\u51fa\u73b0\u5148\u663e\u793a\u65e0\u6837\u5f0f\u7684\u9875\u9762&#xff0c;\u95ea\u70c1\u4e00\u4e0b\u4e4b\u540e&#xff0c;\u518d\u51fa\u73b0\u7f51\u9875\u7684\u6837\u5f0f\u7684\u60c5\u51b5&#xff0c;\u800c\u94fe\u5165\u5f0f\u4e0d\u4f1a\u3002<\/p>\n<p>\u53e6\u5916&#xff0c;&lt;link&gt;\u662f XHTML \u6807\u7b7e&#xff0c;\u9664\u4e86\u52a0\u8f7d CSS \u5916&#xff0c;\u8fd8\u53ef\u4ee5\u5b9a\u4e49 RSS \u7b49\u5176\u4ed6\u4e8b\u52a1&#xff1b;&#064;import\u5c5e\u4e8e CSS \u8303\u7574&#xff0c;\u53ea\u80fd\u52a0\u8f7d CSS\u3002<\/p>\n<hr \/>\n<h2 style=\"text-align:center\">\u9009\u62e9\u5668<\/h2>\n<hr \/>\n<h3 style=\"text-align:center\">\u57fa\u672c\u9009\u62e9\u5668<\/h3>\n<h6>\u6807\u7b7e\u9009\u62e9\u5668<\/h6>\n<p>\u6807\u7b7e\u9009\u62e9\u5668\u662f\u6307\u7528HTML\u6807\u7b7e\u540d\u79f0\u4f5c\u4e3a\u9009\u62e9\u5668&#xff0c;\u6309\u6807\u7b7e\u540d\u79f0\u5206\u7c7b&#xff0c;\u4e3a\u9875\u9762\u4e2d\u67d0\u4e00\u7c7b\u6807\u7b7e\u6307\u5b9a\u7edf\u4e00\u7684CSS\u6837\u5f0f\u3002<\/p>\n<p>&lt;style&gt;<br \/>\n  h2{<br \/>\n     text-align:center;<br \/>\n  }<br \/>\n&lt;\/style&gt; <\/p>\n<h6>\u7c7b\u9009\u62e9\u5668<\/h6>\n<p>\u4f8b\u5982<\/p>\n<p>&lt;style&gt;<br \/>\n   .black{<br \/>\n    background-color: black;<br \/>\n      }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;div class&#061;&#034;black&#034;&gt;&lt;\/div&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<p><span style=\"color:#fe2c24\">.<\/span>\u548c<span style=\"color:#fe2c24\">class<\/span>\u4e00\u8d77\u4f7f\u7528\u00a0&#xff0c;\u6ce8\u610f&#xff1a;\u4e00\u4e2a\u5143\u7d20\u53ef\u4ee5\u6709\u591a\u4e2a\u7c7b&#xff0c;\u6bd4\u5982<\/p>\n<p>&lt;style&gt;<br \/>\n   .black{<br \/>\n    background-color: black;<br \/>\n      }<br \/>\n   .big{<br \/>\n            width:1000px;<br \/>\n            height:1000px;<br \/>\n       }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;div class&#061;&#034;red big&#034;&gt;&lt;\/div&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<p>\u8fd9\u6837.big\u548c.black\u540c\u65f6\u4f5c\u7528\u4e8ediv\u3002<\/p>\n<h6>id\u9009\u62e9\u5668<\/h6>\n<p>\u4e0e\u7c7b\u9009\u62e9\u5668\u4e0d\u540c&#xff1a;id\u5728\u4e00\u4e2a HTML \u6587\u6863\u4e2d\u5fc5\u987b\u662f\u552f\u4e00\u7684&#xff0c;\u6bcf\u4e2a\u5143\u7d20\u53ea\u80fd\u6709\u4e00\u4e2aid&#xff0c;\u4e14\u4e00\u4e2aid\u53ea\u80fd\u5bf9\u5e94\u4e00\u4e2a\u5143\u7d20&#xff1b;\u800c\u7c7b\u540d\u53ef\u4ee5\u88ab\u591a\u4e2a\u5143\u7d20\u4f7f\u7528&#xff0c;\u4e00\u4e2a\u5143\u7d20\u4e5f\u53ef\u4ee5\u540c\u65f6\u62e5\u6709\u591a\u4e2a\u7c7b\u540d\u3002<\/p>\n<p>&lt;style&gt;<br \/>\n   #black{<br \/>\n    background-color: black;<br \/>\n      }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;div id&#061;&#034;black&#034;&gt;&lt;\/div&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<p>id\u9009\u62e9\u5668\u901a\u5e38\u7528\u4e8e\u6807\u8bc6\u9875\u9762\u4e2d\u7684\u5173\u952e\u5143\u7d20\u6216\u4e0e JavaScript \u4ea4\u4e92<\/p>\n<p>id\u9009\u62e9\u5668\u7684\u4f18\u5148\u7ea7\u9ad8\u4e8e\u7c7b\u9009\u62e9\u5668\u3002\u5f53\u4e00\u4e2a\u5143\u7d20\u540c\u65f6\u88abid\u9009\u62e9\u5668\u548c\u7c7b\u9009\u62e9\u5668\u8bbe\u7f6e\u6837\u5f0f\u65f6&#xff0c;id\u9009\u62e9\u5668\u7684\u6837\u5f0f\u4f1a\u8986\u76d6\u7c7b\u9009\u62e9\u5668\u7684\u6837\u5f0f\u3002<\/p>\n<h6>\u901a\u914d\u7b26\u9009\u62e9\u5668<\/h6>\n<p>\u901a\u914d\u7b26\u9009\u62e9\u5668\u7528\u201c<span style=\"color:#fe2c24\">*<\/span>\u201d\u53f7\u8868\u793a&#xff0c;\u5b83\u662f\u6240\u6709\u9009\u62e9\u5668\u4e2d\u4f5c\u7528 \u8303\u56f4\u6700\u5e7f\u7684&#xff0c;\u80fd\u5339\u914d\u9875\u9762\u4e2d\u6240\u6709\u7684\u5143\u7d20\u3002<\/p>\n<p>&lt;style&gt;<br \/>\n       *{<br \/>\n    background-color: black;<br \/>\n      }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;div&gt;&lt;\/div&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<h4>\u5e76\u96c6\u9009\u62e9\u5668<\/h4>\n<p>\u7fa4\u7ec4\u9009\u62e9\u5668\u53c8\u53eb\u5e76\u96c6\u9009\u62e9\u5668&#xff0c;\u662f\u5404\u4e2a\u9009\u62e9\u5668\u901a \u8fc7<span style=\"color:#fe2c24\">\u9017\u53f7<\/span>\u8fde\u63a5\u800c\u6210\u7684&#xff0c;\u5b83\u9009\u62e9\u7684\u662f\u6ee1\u8db3\u5176\u4e2d\u4efb\u610f\u4e00\u4e2a\u9009\u62e9\u5668\u6761\u4ef6\u7684\u5143\u7d20\u3002\u4efb\u4f55\u5f62\u5f0f\u7684\u9009\u62e9\u5668\u90fd\u53ef\u4ee5 \u4f5c\u4e3a\u5e76\u96c6\u9009\u62e9\u5668\u7684\u4e00\u90e8\u5206\u3002<\/p>\n<p>\u8bed\u6cd5\u5f62\u5f0f\u4e3a&#xff1a;\u9009\u62e9\u56681, \u9009\u62e9\u56682, &#8230;\u3002<\/p>\n<p>\u5f53\u4f60\u5e0c\u671b\u4e3a\u4e0d\u540c\u7c7b\u578b\u7684\u5143\u7d20\u5e94\u7528\u76f8\u540c\u7684\u6837\u5f0f\u65f6&#xff0c;\u53ef\u5229\u7528\u5e76\u96c6\u9009\u62e9\u5668\u4e3a \u5b83\u4eec\u5b9a\u4e49\u76f8\u540c\u7684\u6837\u5f0f\u3002<\/p>\n<p>&lt;style&gt;<br \/>\n       #Black,.black,div{<br \/>\n    background-color: black;<br \/>\n      }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;div id&#061;&#034;Black&#034;&gt;&lt;\/div&gt;<br \/>\n    &lt;div class&#061;&#034;black&#034;&gt;&lt;\/div&gt;<br \/>\n    &lt;div&gt;&lt;\/div&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<h4>\u00a0\u4ea4\u96c6\u9009\u62e9\u5668<\/h4>\n<p>\u4ea4\u96c6\u9009\u62e9\u5668\u662f\u7531\u4e24\u4e2a\u6216\u591a\u4e2a\u9009\u62e9\u5668\u76f4\u63a5\u8fde\u63a5\u800c\u6210&#xff0c;\u4e2d\u95f4<span style=\"color:#fe2c24\">\u6ca1\u6709<\/span>\u4efb\u4f55\u5206\u9694\u7b26\u3002\u5b83\u9009\u62e9\u7684\u662f\u540c\u65f6\u6ee1\u8db3<span style=\"color:#fe2c24\">\u6240\u6709<\/span>\u9009\u62e9\u5668\u6761\u4ef6\u7684\u5143\u7d20\u3002\u4e00\u822c\u7684\u8bed\u6cd5\u5f62\u5f0f\u4e3a&#xff1a;\u9009\u62e9\u56681\u9009\u62e9\u56682&#8230;&#xff0c;\u8fd9\u91cc\u7684\u9009\u62e9\u5668\u53ef\u4ee5\u662f\u5143\u7d20\u9009\u62e9\u5668\u3001\u7c7b\u9009\u62e9\u5668\u3001id\u00a0\u9009\u62e9\u5668\u7b49\u3002<\/p>\n<p>&lt;style&gt;<br \/>\np.highlight {<br \/>\n    background-color: yellow;<br \/>\n}<br \/>\n&lt;\/style&gt;<br \/>\n&lt;body&gt;<br \/>\n     &lt;p class&#061;&#034;highlight&#034;&gt;\u8fd9\u662f\u4e00\u4e2a\u9ad8\u4eae\u7684\u6bb5\u843d\u3002&lt;\/p&gt;<br \/>\n     &lt;p&gt;\u8fd9\u662f\u4e00\u4e2a\u666e\u901a\u6bb5\u843d\u3002&lt;\/p&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<h3 style=\"text-align:center\">\u5c42\u6b21\u9009\u62e9\u5668<\/h3>\n<p>\u4e0d\u540c\u7684\u5c42\u6b21\u9009\u62e9\u5668\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u573a\u666f&#xff0c;\u540e\u4ee3\u9009\u62e9\u5668\u7528\u4e8e\u9009\u62e9\u5bbd\u6cdb\u7684\u540e\u4ee3\u5143\u7d20&#xff0c;\u5b50\u9009\u62e9\u5668\u805a\u7126\u4e8e\u76f4\u63a5\u5b50\u5143\u7d20&#xff0c;\u76f8\u90bb\u5144\u5f1f\u9009\u62e9\u5668\u9488\u5bf9\u7d27\u90bb\u7684\u4e0b\u4e00\u4e2a\u5144\u5f1f\u5143\u7d20&#xff0c;\u901a\u7528\u5144\u5f1f\u9009\u62e9\u5668\u5219\u6db5\u76d6\u540e\u9762\u7684\u6240\u6709\u5144\u5f1f\u5143\u7d20\u3002\u5408\u7406\u4f7f\u7528\u8fd9\u4e9b\u5c42\u6b21\u9009\u62e9\u5668\u53ef\u4ee5\u66f4\u7cbe\u51c6\u5730\u63a7\u5236\u9875\u9762\u5143\u7d20\u7684\u6837\u5f0f<\/p>\n<h4>\u540e\u4ee3\u9009\u62e9\u5668\u201c \u201d<\/h4>\n<p>\u540e\u4ee3\u9009\u62e9\u5668\u7531\u4e24\u4e2a\u6216\u591a\u4e2a\u9009\u62e9\u5668\u7ec4\u6210&#xff0c;\u4e2d\u95f4\u7528<span style=\"color:#fe2c24\">\u7a7a\u683c<\/span>\u5206\u9694\u3002\u5b83\u4f1a\u9009\u62e9\u4f5c\u4e3a\u7b2c\u4e00\u4e2a\u9009\u62e9\u5668\u6240\u5339\u914d\u5143\u7d20\u7684\u540e\u4ee3\u5143\u7d20<span style=\"color:#fe2c24\">&#xff08;\u5305\u62ec\u5b50\u5143\u7d20\u3001\u5b59\u5143\u7d20\u7b49&#xff09;<\/span>\u4e2d\u6ee1\u8db3\u7b2c\u4e8c\u4e2a\u9009\u62e9\u5668\u7684\u5143\u7d20\u3002\u8bed\u6cd5\u683c\u5f0f\u4e3a&#xff1a;\u9009\u62e9\u56681 \u9009\u62e9\u56682<\/p>\n<p>&lt;div&gt; &lt;p&gt;\u8fd9\u662fdiv\u5185\u7684\u6bb5\u843d\u3002&lt;\/p&gt; &lt;span&gt;\u8fd9\u662fdiv\u5185\u7684span\u3002&lt;\/span&gt; &lt;p&gt;\u8fd9\u662f\u53e6\u4e00\u4e2adiv\u5185\u7684\u6bb5\u843d\u3002&lt;\/p&gt; &lt;\/div&gt; &lt;p&gt;\u8fd9\u662fdiv\u5916\u7684\u6bb5\u843d\u3002&lt;\/p&gt;<\/p>\n<p>&lt;style&gt;<br \/>\ndiv p {<br \/>\n    color: red;<br \/>\n}<br \/>\n&lt;\/style&gt;<br \/>\n&lt;body&gt;<br \/>\n     &lt;div&gt;<br \/>\n         &lt;p&gt;\u8fd9\u662fdiv\u5185\u7684\u6bb5\u843d\u3002&lt;\/p&gt;<br \/>\n         &lt;span&gt;\u8fd9\u662fdiv\u5185\u7684span\u3002&lt;\/span&gt;<br \/>\n         &lt;p&gt;\u8fd9\u662f\u53e6\u4e00\u4e2adiv\u5185\u7684\u6bb5\u843d\u3002&lt;\/p&gt;<br \/>\n     &lt;\/div&gt;<br \/>\n     &lt;p&gt;\u8fd9\u662fdiv\u5916\u7684\u6bb5\u843d\u3002&lt;\/p&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<h4>\u5b50\u5143\u7d20\u9009\u62e9 \u5668\u201c&gt;\u201d<\/h4>\n<p>\u5b50\u9009\u62e9\u5668\u4f7f\u7528\u5927\u4e8e\u53f7\u00a0&gt;\u00a0\u5206\u9694\u4e24\u4e2a\u9009\u62e9\u5668&#xff0c;\u5b83\u53ea\u9009\u62e9\u4f5c\u4e3a\u7b2c\u4e00\u4e2a\u9009\u62e9\u5668\u6240\u5339\u914d\u5143\u7d20\u7684<span style=\"color:#fe2c24\">\u76f4\u63a5\u5b50\u5143\u7d20<\/span>\u4e2d\u6ee1\u8db3\u7b2c\u4e8c\u4e2a\u9009\u62e9\u5668\u7684\u5143\u7d20\u3002\u8bed\u6cd5\u683c\u5f0f\u4e3a&#xff1a;\u9009\u62e9\u56681 &gt; \u9009\u62e9\u56682\u3002<\/p>\n<p>\u5f53\u4f60\u53ea\u60f3\u4e3a\u67d0\u4e2a\u5143\u7d20\u7684\u76f4\u63a5\u5b50\u5143\u7d20\u8bbe\u7f6e\u6837\u5f0f&#xff0c;\u800c\u4e0d\u5f71\u54cd\u5176\u66f4\u6df1\u5c42\u6b21\u7684\u540e\u4ee3\u5143\u7d20\u65f6&#xff0c;\u5b50\u9009\u62e9\u5668\u5f88\u5408\u9002\u3002\u4f8b\u5982&#xff0c;\u4e3a\u00a0ul\u00a0\u5143\u7d20\u7684\u76f4\u63a5\u5b50\u5143\u7d20\u00a0li\u00a0\u8bbe\u7f6e\u80cc\u666f\u989c\u8272&#xff1a;<\/p>\n<p>&lt;style&gt;<br \/>\n       ul &gt; li {<br \/>\n            background-color: lightblue;<br \/>\n       }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;ul&gt;<br \/>\n    &lt;li&gt;\u4e00\u7ea7\u5217\u8868\u9879&lt;\/li&gt;<br \/>\n    &lt;li&gt;<br \/>\n        \u4e00\u7ea7\u5217\u8868\u9879<br \/>\n        &lt;ul&gt;<br \/>\n            &lt;li&gt;\u4e8c\u7ea7\u5217\u8868\u9879&lt;\/li&gt;<br \/>\n        &lt;\/ul&gt;<br \/>\n    &lt;\/li&gt;<br \/>\n    &lt;\/ul&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d&#xff0c;\u53ea\u6709\u4e00\u7ea7\u00a0li\u00a0\u5143\u7d20\u4f1a\u6709\u6d45\u84dd\u8272\u80cc\u666f&#xff0c;\u4e8c\u7ea7\u00a0li\u00a0\u5143\u7d20\u4e0d\u53d7\u5f71\u54cd<\/p>\n<h4>\u76f8\u90bb\u5144\u5f1f\u9009\u62e9\u5668\u201c&#043;\u201d<\/h4>\n<p>\u76f8\u90bb\u5144\u5f1f\u9009\u62e9\u5668\u4f7f\u7528\u52a0\u53f7\u00a0&#043;\u00a0\u5206\u9694\u4e24\u4e2a\u9009\u62e9\u5668&#xff0c;\u5b83<span style=\"color:null\">\u9009\u62e9\u7d27\u8ddf\u5728\u7b2c\u4e00\u4e2a<\/span>\u9009\u62e9\u5668\u6240\u5339\u914d\u5143\u7d20\u4e4b\u540e\u7684\u3001\u5e76\u4e14\u4e0e\u5b83\u5177\u6709<span style=\"color:#fe2c24\">\u76f8\u540c\u7236\u5143\u7d20<\/span>\u7684\u3001\u6ee1\u8db3\u7b2c\u4e8c\u4e2a\u9009\u62e9\u5668\u7684<span style=\"color:#fe2c24\">\u76f8\u90bb<\/span>\u5143\u7d20\u3002\u8bed\u6cd5\u683c\u5f0f\u4e3a&#xff1a;\u9009\u62e9\u56681 &#043; \u9009\u62e9\u56682\u3002<\/p>\n<\/p>\n<p>&lt;style&gt;<br \/>\n       h2 &#043; p {<br \/>\n         font-style: italic;<br \/>\n       }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;h2&gt;\u6807\u9898&lt;\/h2&gt;<br \/>\n    &lt;p&gt;\u8fd9\u662f\u6807\u9898\u540e\u9762\u7684\u7b2c\u4e00\u4e2a\u6bb5\u843d\u3002&lt;\/p&gt;<br \/>\n    &lt;p&gt;\u8fd9\u662f\u53e6\u4e00\u4e2a\u6bb5\u843d\u3002&lt;\/p&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d&#xff0c;\u53ea\u6709\u7d27\u8ddf\u5728\u00a0h2\u00a0\u5143\u7d20\u540e\u9762\u7684\u7b2c\u4e00\u4e2a\u00a0p\u00a0\u5143\u7d20\u6587\u672c\u4f1a\u53d8\u4e3a\u659c\u4f53&#xff0c;\u7b2c\u4e8c\u4e2a\u00a0p\u00a0\u5143\u7d20\u4e0d\u53d7\u5f71\u54cd\u00a0<\/p>\n<h4>\u901a\u7528\u5144\u5f1f\u9009\u62e9\u5668\u201c~\u201d<\/h4>\n<p>\u901a\u7528\u5144\u5f1f\u9009\u62e9\u5668\u4f7f\u7528\u6ce2\u6d6a\u53f7\u00a0~\u00a0\u5206\u9694\u4e24\u4e2a\u9009\u62e9\u5668&#xff0c;\u5b83\u9009\u62e9\u5728\u7b2c\u4e00\u4e2a\u9009\u62e9\u5668\u6240\u5339\u914d\u5143\u7d20\u4e4b\u540e\u7684\u3001\u5e76\u4e14\u4e0e\u5b83\u5177\u6709<span style=\"color:#fe2c24\">\u76f8\u540c\u7236\u5143\u7d20<\/span>\u7684\u3001\u6ee1\u8db3\u7b2c\u4e8c\u4e2a\u9009\u62e9\u5668\u7684<span style=\"color:#fe2c24\">\u6240\u6709<\/span>\u5144\u5f1f\u5143\u7d20\u3002\u8bed\u6cd5\u683c\u5f0f\u4e3a&#xff1a;\u9009\u62e9\u56681 ~ \u9009\u62e9\u56682\u3002<\/p>\n<p>&lt;style&gt;<br \/>\n      h3 ~ p {<br \/>\n         color: green;<br \/>\n      }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;h3&gt;\u5c0f\u6807\u9898&lt;\/h3&gt;<br \/>\n    &lt;p&gt;\u8fd9\u662f\u5c0f\u6807\u9898\u540e\u9762\u7684\u6bb5\u843d\u3002&lt;\/p&gt;<br \/>\n    &lt;div&gt;\u4e00\u4e9b\u5176\u4ed6\u5185\u5bb9&lt;\/div&gt;<br \/>\n    &lt;p&gt;\u8fd9\u662f\u53e6\u4e00\u4e2a\u6bb5\u843d\u3002&lt;\/p&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d&#xff0c;h3\u00a0\u5143\u7d20\u540e\u9762\u7684\u6240\u6709\u00a0p\u00a0\u5143\u7d20\u6587\u672c\u989c\u8272\u90fd\u4f1a\u53d8\u4e3a\u7eff\u8272\u3002<\/p>\n<h3 style=\"text-align:center\">\u94fe\u63a5\u4f2a\u7c7b\u63a7\u5236\u8d85\u94fe\u63a5<\/h3>\n<p>\u5728 CSS \u91cc&#xff0c;\u94fe\u63a5\u4f2a\u7c7b\u662f\u4e00\u79cd\u7279\u6b8a\u7684\u9009\u62e9\u5668&#xff0c;\u4e13\u95e8\u7528\u4e8e\u63a7\u5236\u8d85\u94fe\u63a5\u5728\u4e0d\u540c\u72b6\u6001\u4e0b\u7684\u6837\u5f0f\u3002\u4e3b\u8981\u6709\u56db\u4e2a\u94fe\u63a5\u4f2a\u7c7b&#xff0c;\u5206\u522b\u662f\u00a0:link\u3001:visited\u3001:hover\u00a0\u548c\u00a0:active<\/p>\n<h4>1.\u00a0:link\u00a0\u4f2a\u7c7b<\/h4>\n<p>\u00a0:link\u00a0\u4f2a\u7c7b\u7528\u4e8e\u9009\u62e9\u90a3\u4e9b\u5c1a<span style=\"color:#fe2c24\">\u672a\u88ab\u8bbf\u95ee\u8fc7<\/span>\u7684\u8d85\u94fe\u63a5\u3002\u4e5f\u5c31\u662f\u5728\u7528\u6237\u70b9\u51fb\u94fe\u63a5\u4e4b\u524d&#xff0c;\u94fe\u63a5\u5904\u4e8e\u9ed8\u8ba4\u72b6\u6001\u65f6\u5e94\u7528\u6837\u5f0f\u3002<\/p>\n<h4>2.\u00a0:visited\u00a0\u4f2a\u7c7b<\/h4>\n<p>\u00a0:visited\u00a0\u4f2a\u7c7b\u7528\u4e8e\u9009\u62e9\u90a3\u4e9b\u5df2\u7ecf<span style=\"color:#fe2c24\">\u88ab\u8bbf\u95ee\u8fc7<\/span>\u7684\u8d85\u94fe\u63a5\u3002\u501f\u52a9\u8fd9\u4e2a\u4f2a\u7c7b&#xff0c;\u80fd\u591f\u4e3a\u5df2\u8bbf\u95ee\u7684\u94fe\u63a5\u8bbe\u7f6e\u4e0d\u540c\u6837\u5f0f&#xff0c;\u65b9\u4fbf\u7528\u6237\u533a\u5206\u5df2\u8bbf\u95ee\u548c\u672a\u8bbf\u95ee\u7684\u94fe\u63a5\u3002<\/p>\n<h4>3.\u00a0:hover\u00a0\u4f2a\u7c7b<\/h4>\n<p>\u00a0:hover\u00a0\u4f2a\u7c7b\u7528\u4e8e\u9009\u62e9\u5f53\u9f20\u6807<span style=\"color:#fe2c24\">\u6307\u9488\u60ac\u505c<\/span>\u5728\u8d85\u94fe\u63a5\u4e0a\u65f6\u7684\u72b6\u6001\u3002\u5f53\u9f20\u6807\u60ac\u505c\u5728\u94fe\u63a5\u4e0a\u65f6&#xff0c;\u53ef\u4ee5\u6539\u53d8\u94fe\u63a5\u7684\u6837\u5f0f&#xff0c;\u4ee5\u6b64\u589e\u5f3a\u7528\u6237\u4ea4\u4e92\u4f53\u9a8c\u3002&#xff08;<span style=\"color:#fe2c24\">\u8be5\u4f2a\u7c7b\u4e0d\u5c40\u9650\u4e8e\u8d85\u94fe\u63a5<\/span>&#xff09;<\/p>\n<h4>4.\u00a0:active\u00a0\u4f2a\u7c7b<\/h4>\n<p>\u00a0:active\u00a0\u4f2a\u7c7b\u7528\u4e8e\u9009\u62e9\u5f53\u7528\u6237\u70b9\u51fb\u8d85\u94fe\u63a5\u65f6\u7684\u77ac\u95f4\u72b6\u6001&#xff0c;\u4e5f\u5c31\u662f\u9f20\u6807<span style=\"color:#fe2c24\">\u6309\u4e0b\u4f46\u8fd8\u672a\u677e\u5f00<\/span>\u65f6\u7684\u72b6\u6001<\/p>\n<h4>\u4f2a\u7c7b\u987a\u5e8f<\/h4>\n<p>\u5728\u4f7f\u7528\u8fd9\u4e9b\u94fe\u63a5\u4f2a\u7c7b\u65f6&#xff0c;\u9700\u8981\u6ce8\u610f\u5b83\u4eec\u7684\u987a\u5e8f&#xff0c;\u4e00\u822c\u5efa\u8bae\u6309\u7167\u00a0:link\u3001:visited\u3001:hover\u3001:active\u00a0\u7684\u987a\u5e8f\u6765\u5b9a\u4e49\u6837\u5f0f&#xff0c;\u4e5f\u5c31\u662f\u9075\u5faa \u201cLVHA\u201d \u539f\u5219\u3002\u5982\u679c\u987a\u5e8f\u4e0d\u5bf9&#xff0c;\u53ef\u80fd\u4f1a\u5bfc\u81f4\u67d0\u4e9b\u6837\u5f0f\u65e0\u6cd5\u6b63\u5e38\u663e\u793a\u3002\u4f8b\u5982&#xff1a;<\/p>\n<p>&lt;head&gt;<br \/>\n    &lt;style&gt;<br \/>\n       a:link { color: blue; }<br \/>\n       a:visited { color: purple; }<br \/>\n       a:hover { color: red; }<br \/>\n       a:active { color: white; }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;a href&#061;&#034;https:\/\/www.example.com&#034;&gt;\u8bbf\u95ee\u793a\u4f8b\u7f51\u7ad9&lt;\/a&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<h3 style=\"text-align:center\">CSS\u7684\u5c42\u53e0\u6027\u548c\u7ee7\u627f\u6027<\/h3>\n<h4>\u5c42\u53e0\u6027<\/h4>\n<p>CSS \u7684\u5c42\u53e0\u6027\u662f\u6307\u5f53\u591a\u4e2a CSS \u89c4\u5219\u5e94\u7528\u4e8e\u540c\u4e00\u4e2a\u5143\u7d20\u65f6&#xff0c;\u6d4f\u89c8\u5668\u4f1a\u6839\u636e\u4e00\u5b9a\u7684\u89c4\u5219\u6765\u51b3\u5b9a\u6700\u7ec8\u5e94\u7528\u54ea\u4e9b\u6837\u5f0f\u3002\u7b80\u5355\u6765\u8bf4&#xff0c;\u5c31\u662f\u5f53\u6709\u591a\u4e2a\u6837\u5f0f\u89c4\u5219\u5bf9\u540c\u4e00\u4e2a\u5143\u7d20\u7684\u540c\u4e00\u4e2a\u5c5e\u6027\u8fdb\u884c\u8bbe\u7f6e\u65f6&#xff0c;\u8fd9\u4e9b\u89c4\u5219\u4f1a\u76f8\u4e92 \u201c\u5c42\u53e0\u201d&#xff0c;\u6700\u7ec8\u6d4f\u89c8\u5668\u4f1a\u6309\u7167\u7279\u5b9a\u7684<span style=\"color:#fe2c24\">\u4f18\u5148\u7ea7<\/span>\u6765\u786e\u5b9a\u8be5\u5c5e\u6027\u7684\u6700\u7ec8\u503c<\/p>\n<h5>\u5c42\u53e0\u89c4\u5219<\/h5>\n<ul>\n<li>\u6837\u5f0f\u6765\u6e90\u4f18\u5148\u7ea7&#xff1a;\u4e0d\u540c\u6765\u6e90\u7684\u6837\u5f0f\u5177\u6709\u4e0d\u540c\u7684\u4f18\u5148\u7ea7&#xff0c;\u4ece\u9ad8\u5230\u4f4e\u4f9d\u6b21\u4e3a&#xff1a;\n<ul>\n<li>\u5185\u8054\u6837\u5f0f&#xff1a;\u76f4\u63a5\u5199\u5728 HTML \u5143\u7d20\u7684\u00a0style\u00a0\u5c5e\u6027\u4e2d\u7684\u6837\u5f0f&#xff0c;\u4f18\u5148\u7ea7\u6700\u9ad8\u3002\u4f8b\u5982&#xff1a;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;p style&#061;&#034;color: red;&#034;&gt;\u8fd9\u662f\u4e00\u6bb5\u5185\u8054\u6837\u5f0f\u7684\u6587\u672c&lt;\/p&gt;\u3002<\/li>\n<li>\u5185\u90e8\u6837\u5f0f\u8868&#xff1a;\u5199\u5728 HTML \u6587\u4ef6\u7684\u00a0&lt;style&gt;\u00a0\u6807\u7b7e\u5185\u7684\u6837\u5f0f\u3002<\/li>\n<li>\u5916\u90e8\u6837\u5f0f\u8868&#xff1a;\u901a\u8fc7\u00a0&lt;link&gt;\u00a0\u6807\u7b7e\u5f15\u5165\u7684\u5916\u90e8 CSS \u6587\u4ef6\u4e2d\u7684\u6837\u5f0f\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u9009\u62e9\u5668\u4f18\u5148\u7ea7&#xff1a;\u5f53\u6837\u5f0f\u6765\u6e90\u76f8\u540c\u65f6&#xff0c;\u9009\u62e9\u5668\u7684\u4f18\u5148\u7ea7\u51b3\u5b9a\u4e86\u54ea\u4e2a\u6837\u5f0f\u4f1a\u88ab\u5e94\u7528\u3002\u9009\u62e9\u5668\u4f18\u5148\u7ea7\u4ece\u9ad8\u5230\u4f4e\u4f9d\u6b21\u4e3a&#xff1a;\n<ul>\n<li>ID \u9009\u62e9\u5668&#xff1a;\u4ee5\u00a0#\u00a0\u5f00\u5934\u7684\u9009\u62e9\u5668&#xff0c;\u5982\u00a0#myId\u3002<\/li>\n<li>\u7c7b\u9009\u62e9\u5668\u3001\u5c5e\u6027\u9009\u62e9\u5668\u548c\u4f2a\u7c7b\u9009\u62e9\u5668&#xff1a;\u5982\u00a0.myClass\u3001[type&#061;&#034;text&#034;]\u3001:hover\u00a0\u7b49\u3002<\/li>\n<li>\u5143\u7d20\u9009\u62e9\u5668\u548c\u4f2a\u5143\u7d20\u9009\u62e9\u5668&#xff1a;\u5982\u00a0p\u3001::before\u00a0\u7b49\u3002<\/li>\n<li>\u901a\u914d\u7b26\u9009\u62e9\u5668&#xff1a;*&#xff0c;\u4f18\u5148\u7ea7\u6700\u4f4e\u3002<\/li>\n<li>\u7ee7\u627f\u6837\u5f0f&#xff1a;\u7ee7\u627f\u800c\u6765\u7684\u6837\u5f0f\u4f18\u5148\u7ea7\u6700\u4f4e\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>\u7ee7\u627f\u6027<\/h4>\n<p>CSS \u7684\u7ee7\u627f\u6027\u662f\u6307\u67d0\u4e9b CSS \u5c5e\u6027\u4f1a\u81ea\u52a8\u4ece\u7236\u5143\u7d20\u4f20\u9012\u7ed9\u5b50\u5143\u7d20&#xff0c;\u5b50\u5143\u7d20\u65e0\u9700\u663e\u5f0f\u8bbe\u7f6e\u8fd9\u4e9b\u5c5e\u6027&#xff0c;\u5c31\u53ef\u4ee5\u7ee7\u627f\u7236\u5143\u7d20\u7684\u5c5e\u6027\u503c\u3002\u8fd9\u6837\u53ef\u4ee5\u51cf\u5c11\u4ee3\u7801\u7684\u91cd\u590d\u7f16\u5199&#xff0c;\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u7ef4\u62a4\u6027<\/p>\n<p>\u53ef\u7ee7\u627f\u5c5e\u6027&#xff1a;\u5e38\u89c1\u7684\u53ef\u7ee7\u627f\u5c5e\u6027\u5305\u62ec\u5b57\u4f53\u76f8\u5173\u5c5e\u6027&#xff08;\u5982\u00a0font-family\u3001font-size\u3001color\u00a0\u7b49&#xff09;\u3001\u6587\u672c\u76f8\u5173\u5c5e\u6027&#xff08;\u5982\u00a0text-align\u3001line-height\u00a0\u7b49&#xff09;<\/p>\n<p>&lt;head&gt;<br \/>\n    &lt;style&gt;<br \/>\n        body {<br \/>\n            font-family: Arial, sans-serif;<br \/>\n            color: gray;<br \/>\n        }<\/p>\n<p>        p {<br \/>\n            \/* \u65e0\u9700\u8bbe\u7f6e font-family \u548c color&#xff0c;\u4f1a\u7ee7\u627f body \u7684\u6837\u5f0f *\/<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<br \/>\n    &lt;p&gt;\u8fd9\u662f\u4e00\u4e2a\u6bb5\u843d&#xff0c;\u4f1a\u7ee7\u627f body \u7684\u5b57\u4f53\u548c\u989c\u8272&lt;\/p&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<p>\u4e0d\u53ef\u7ee7\u627f\u5c5e\u6027&#xff1a;\u5927\u591a\u6570\u76d2\u5b50\u6a21\u578b\u76f8\u5173\u5c5e\u6027&#xff08;\u5982\u00a0width\u3001height\u3001margin\u3001padding\u3001border\u00a0\u7b49&#xff09;\u4e00\u822c\u60c5\u51b5\u4e0b\u662f\u4e0d\u53ef\u7ee7\u627f\u7684<\/p>\n<h5>inherit\u00a0<\/h5>\n<p>\u5982\u679c\u9700\u8981\u8ba9\u67d0\u4e2a\u4e0d\u53ef\u7ee7\u627f\u7684\u5c5e\u6027\u5f3a\u5236\u7ee7\u627f\u7236\u5143\u7d20\u7684\u503c&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u00a0inherit\u00a0\u5173\u952e\u5b57\u3002<\/p>\n<p>&lt;head&gt;<br \/>\n    &lt;style&gt;<br \/>\n        div {<br \/>\n            border: 1px solid red;<br \/>\n        }<\/p>\n<p>        p {<br \/>\n            border: inherit;<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;div&gt;<br \/>\n        &lt;p&gt;\u8fd9\u662f\u4e00\u4e2a\u6bb5\u843d&#xff0c;\u901a\u8fc7 inherit \u5173\u952e\u5b57\u7ee7\u627f\u4e86 div \u7684\u8fb9\u6846\u6837\u5f0f&lt;\/p&gt;<br \/>\n    &lt;\/div&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<h3 style=\"text-align:center\">\u52a8\u6001\u4f2a\u7c7b\u9009\u62e9\u5668<\/h3>\n<h4>:focus<\/h4>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u5f53\u5143\u7d20\u83b7\u5f97\u7126\u70b9\u65f6\u5e94\u7528\u6837\u5f0f&#xff0c;\u5e38\u7528\u4e8e\u8868\u5355\u5143\u7d20&#xff08;\u5982\u8f93\u5165\u6846\u3001\u6309\u94ae\u7b49&#xff09;\u3002<\/li>\n<\/ul>\n<p>&lt;head&gt;<br \/>\n    &lt;style&gt;<br \/>\n        input:focus {<br \/>\n            border: 2px solid blue;<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;input type&#061;&#034;text&#034; placeholder&#061;&#034;\u8f93\u5165\u5185\u5bb9&#034;&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<p>\u5f53\u8f93\u5165\u6846\u83b7\u5f97\u7126\u70b9\u65f6&#xff0c;\u5176\u8fb9\u6846\u4f1a\u53d8\u4e3a 2 \u50cf\u7d20\u5bbd\u7684\u84dd\u8272\u8fb9\u6846<\/p>\n<h4>:first-child<\/h4>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u9009\u62e9\u4f5c\u4e3a\u5176\u7236\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20\u7684\u5143\u7d20<\/li>\n<\/ul>\n<h4>:last-child<\/h4>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u9009\u62e9\u4f5c\u4e3a\u5176\u7236\u5143\u7d20\u7684\u6700\u540e\u4e00\u4e2a\u5b50\u5143\u7d20\u7684\u5143\u7d20\u3002<\/li>\n<\/ul>\n<h4>:nth-child(n)<\/h4>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u9009\u62e9\u4f5c\u4e3a\u5176\u7236\u5143\u7d20\u7684\u7b2c\u00a0n\u00a0\u4e2a\u5b50\u5143\u7d20\u7684\u5143\u7d20&#xff0c;n\u00a0\u53ef\u4ee5\u662f\u6570\u5b57\u3001\u5173\u952e\u5b57&#xff08;\u5982<span style=\"color:#fe2c24\">\u00a0odd<\/span>\u00a0\u8868\u793a\u5947\u6570\u9879&#xff0c;<span style=\"color:#fe2c24\">even<\/span>\u00a0\u8868\u793a\u5076\u6570\u9879&#xff09;\u6216<span style=\"color:#fe2c24\">\u516c\u5f0f<\/span>&#xff08;\u5982\u00a02n&#043;1\u00a0\u8868\u793a\u4ece\u7b2c 1 \u9879\u5f00\u59cb\u6bcf\u9694\u4e00\u9879&#xff09;\u3002<\/li>\n<\/ul>\n<h4>:nth-last-child(n)<\/h4>\n<ul>\n<li>\u4f5c\u7528&#xff1a;\u9009\u62e9\u4f5c\u4e3a\u5176\u7236\u5143\u7d20\u7684\u5012\u6570\u7b2c\u00a0n\u00a0\u4e2a\u5b50\u5143\u7d20\u7684\u5143\u7d20\u3002<\/li>\n<\/ul>\n<p>&lt;head&gt;<br \/>\n    &lt;style&gt;<br \/>\n        ul li:nth-child(2) {<br \/>\n            color: pink;<br \/>\n        }<br \/>\n        ul li:last-child {<br \/>\n            color: orange;<br \/>\n        }<br \/>\n        ul li:first-child {<br \/>\n            color: green;<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;ul&gt;<br \/>\n        &lt;li&gt;\u7b2c\u4e00\u9879&lt;\/li&gt;<br \/>\n        &lt;li&gt;\u7b2c\u4e8c\u9879&lt;\/li&gt;<br \/>\n        &lt;li&gt;\u7b2c\u4e09\u9879&lt;\/li&gt;<br \/>\n    &lt;\/ul&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<h4>:only-child<\/h4>\n<p><span style=\"color:null\">\u5b83\u7528\u4e8e\u9009\u62e9\u90a3\u4e9b\u4f5c\u4e3a\u5176\u7236\u5143\u7d20\u7684\u552f\u4e00\u5b50\u5143\u7d20\u7684\u5143\u7d20\u3002\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u5f53\u4e00\u4e2a\u5143\u7d20\u662f\u5176\u7236\u5143\u7d20\u7684\u552f\u4e00\u5b50\u5143\u7d20\u65f6&#xff0c;\u8be5\u5143\u7d20\u5c31\u4f1a\u88ab\u00a0:only-child\u00a0\u9009\u62e9\u5668\u9009\u4e2d\u3002<\/span><\/p>\n<h4>:root<\/h4>\n<p>\u5728 HTML \u6587\u6863\u4e2d&#xff0c;\u6839\u5143\u7d20\u5c31\u662f\u00a0&lt;html&gt;\u00a0\u6807\u7b7e\u3002\u4e0d\u8fc7&#xff0c;\u76f8\u8f83\u4e8e\u76f4\u63a5\u4f7f\u7528\u00a0html\u00a0\u9009\u62e9\u5668&#xff0c;:root\u00a0\u5177\u6709\u4e00\u4e9b\u72ec\u7279\u7684\u4f18\u52bf\u548c\u5e94\u7528\u573a\u666f\u3002<\/p>\n<p>:root\u00a0\u662f\u5b9a\u4e49\u5168\u5c40 CSS \u53d8\u91cf\u7684\u7406\u60f3\u4f4d\u7f6e\u3002\u901a\u8fc7\u5728\u00a0:root\u00a0\u4e2d\u5b9a\u4e49\u53d8\u91cf&#xff0c;\u53ef\u4ee5\u5728\u6574\u4e2a\u6587\u6863\u7684\u4efb\u4f55\u5730\u65b9\u4f7f\u7528\u8fd9\u4e9b\u53d8\u91cf&#xff0c;\u65b9\u4fbf\u8fdb\u884c\u4e3b\u9898\u5207\u6362\u548c\u6837\u5f0f\u7edf\u4e00\u7ba1\u7406\u3002\u4f8b\u5982&#xff0c;\u4f60\u53ef\u4ee5\u5b9a\u4e49\u4e0d\u540c\u7684\u989c\u8272\u53d8\u91cf\u7528\u4e8e\u4e0d\u540c\u7684\u4e3b\u9898&#xff0c;\u7136\u540e\u901a\u8fc7 JavaScript \u52a8\u6001\u4fee\u6539\u8fd9\u4e9b\u53d8\u91cf\u7684\u503c\u6765\u5207\u6362\u4e3b\u9898\u3002<\/p>\n<h4>\u501f\u52a9JS\u5b9e\u73b0\u5207\u6362\u4e0d\u540c\u7684\u4e3b\u9898<\/h4>\n<p>\u7b80\u5355\u770b\u4e00\u4e0b\u5427&#xff0c;JavaScript\u4e4b\u540e\u518d\u5b66<\/p>\n<p>&lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<\/p>\n<p>&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;meta name&#061;&#034;viewport&#034; content&#061;&#034;width&#061;device-width, initial-scale&#061;1.0&#034;&gt;<br \/>\n    &lt;title&gt;Root Pseudo-Class Theme Switch&lt;\/title&gt;<br \/>\n    &lt;style&gt;<br \/>\n        :root {<br \/>\n            &#8211;primary-color: #007BFF;<br \/>\n            &#8211;secondary-color: #6C757D;<br \/>\n            &#8211;background-color: #FFFFFF;<br \/>\n            &#8211;text-color: #333333;<br \/>\n        }<\/p>\n<p>        body {<br \/>\n            background-color: var(&#8211;background-color);<br \/>\n            color: var(&#8211;text-color);<br \/>\n        }<\/p>\n<p>        button {<br \/>\n            background-color: var(&#8211;primary-color);<br \/>\n            color: white;<br \/>\n            border: none;<br \/>\n            padding: 10px 20px;<br \/>\n            cursor: pointer;<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<br \/>\n    &lt;h1&gt;\u4e3b\u9898\u5207\u6362\u793a\u4f8b&lt;\/h1&gt;<br \/>\n    &lt;button onclick&#061;&#034;switchToDarkTheme()&#034;&gt;\u5207\u6362\u5230\u6df1\u8272\u4e3b\u9898&lt;\/button&gt;<br \/>\n    &lt;button onclick&#061;&#034;switchToLightTheme()&#034;&gt;\u5207\u6362\u5230\u6d45\u8272\u4e3b\u9898&lt;\/button&gt;<\/p>\n<p>    &lt;p&gt;\u8fd9\u662f\u4e00\u6bb5\u793a\u4f8b\u6587\u672c&#xff0c;\u989c\u8272\u548c\u80cc\u666f\u4f1a\u968f\u4e3b\u9898\u53d8\u5316\u3002&lt;\/p&gt;<\/p>\n<p>    &lt;script&gt;<br \/>\n        function switchToDarkTheme() {<br \/>\n            document.documentElement.style.setProperty(&#039;&#8211;primary-color&#039;, &#039;#17a2b8&#039;);<br \/>\n            document.documentElement.style.setProperty(&#039;&#8211;secondary-color&#039;, &#039;#343a40&#039;);<br \/>\n            document.documentElement.style.setProperty(&#039;&#8211;background-color&#039;, &#039;#212529&#039;);<br \/>\n            document.documentElement.style.setProperty(&#039;&#8211;text-color&#039;, &#039;#FFFFFF&#039;);<br \/>\n        }<\/p>\n<p>        function switchToLightTheme() {<br \/>\n            document.documentElement.style.setProperty(&#039;&#8211;primary-color&#039;, &#039;#007BFF&#039;);<br \/>\n            document.documentElement.style.setProperty(&#039;&#8211;secondary-color&#039;, &#039;#6C757D&#039;);<br \/>\n            document.documentElement.style.setProperty(&#039;&#8211;background-color&#039;, &#039;#FFFFFF&#039;);<br \/>\n            document.documentElement.style.setProperty(&#039;&#8211;text-color&#039;, &#039;#333333&#039;);<br \/>\n        }<br \/>\n    &lt;\/script&gt;<br \/>\n&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;     <\/p>\n<h5>\u8bbe\u7f6e\u5168\u5c40\u5b57\u4f53\u6837\u5f0f\u548c\u4e00\u4e9b\u57fa\u672c\u6837\u5f0f\u7684\u793a\u4f8b<\/h5>\n<p>&lt;head&gt;<br \/>\n    &lt;style&gt;<br \/>\n        :root {<br \/>\n            font-family: Arial, sans-serif;<br \/>\n            font-size: 16px;<br \/>\n            line-height: 1.6;<br \/>\n            color: #333;<br \/>\n        }<\/p>\n<p>        body {<br \/>\n            margin: 0;<br \/>\n            padding: 20px;<br \/>\n        }<\/p>\n<p>        h1 {<br \/>\n            font-size: 2em;<br \/>\n        }<\/p>\n<p>        p {<br \/>\n            margin-bottom: 1em;<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<br \/>\n    &lt;h1&gt;\u5168\u5c40\u6837\u5f0f\u793a\u4f8b&lt;\/h1&gt;<br \/>\n    &lt;p&gt;\u8fd9\u6bb5\u6587\u672c\u4f7f\u7528\u4e86\u5728 :root \u4e2d\u5b9a\u4e49\u7684\u5168\u5c40\u5b57\u4f53\u548c\u57fa\u672c\u6837\u5f0f\u3002&lt;\/p&gt;<br \/>\n    &lt;p&gt;\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u6574\u4e2a\u6587\u6863\u5177\u6709\u4e00\u81f4\u7684\u5916\u89c2\u3002&lt;\/p&gt;<br \/>\n&lt;\/body&gt; <\/p>\n<h4>:not<\/h4>\n<p>:not()\u00a0\u662f CSS \u4e2d\u7684\u4e00\u4e2a\u5426\u5b9a\u4f2a\u7c7b\u9009\u62e9\u5668&#xff0c;\u901a\u8fc7\u4f7f\u7528\u00a0:not()&#xff0c;\u4f60\u53ef\u4ee5\u6392\u9664\u67d0\u4e9b\u5143\u7d20\u3002<\/p>\n<p>\u793a\u4f8b&#xff1a;<\/p>\n<p>li:not(.special) {<br \/>\n    color: blue;<br \/>\n}<br \/>\n&lt;ul&gt;<br \/>\n    &lt;li class&#061;&#034;special&#034;&gt;\u7b2c\u4e00\u9879&lt;\/li&gt;<br \/>\n    &lt;li&gt;\u7b2c\u4e8c\u9879&lt;\/li&gt;<br \/>\n    &lt;li&gt;\u7b2c\u4e09\u9879&lt;\/li&gt;<br \/>\n&lt;\/ul&gt; <\/p>\n<h4>:empty<\/h4>\n<p>:empty\u9009\u62e9\u5668\u7528\u6765\u9009\u62e9\u6ca1\u6709\u5b50\u5143\u7d20\u6216\u6587\u672c\u5185\u5bb9\u4e3a\u7a7a\u7684\u6240 \u6709\u5143\u7d20\u3002<\/p>\n<p><span style=\"color:#4da8ee\">\u8be5\u5143\u7d20\u5185\u90e8\u6ca1\u6709\u4efb\u4f55\u5185\u5bb9&#xff08;\u5305\u62ec\u6587\u672c\u3001\u6807\u7b7e\u3001\u6ce8\u91ca\u7b49&#xff09;&#xff0c;\u4f46\u4e0d\u5305\u62ec\u4ec5\u5305\u542b\u7a7a\u767d\u5b57\u7b26&#xff08;\u5982\u7a7a\u683c\u3001\u6362\u884c\u7b26&#xff09;\u7684\u5143\u7d20\u3002<\/span><\/p>\n<p>\/* \u9009\u4e2d\u6240\u6709\u7a7a\u5143\u7d20&#xff0c;\u8bbe\u7f6e\u7ea2\u8272\u8fb9\u6846 *\/<br \/>\n:empty {<br \/>\n    width: 100px;<br \/>\n    height: 100px;<br \/>\n    border: 2px solid red;<br \/>\n}<br \/>\n&lt;div class&#061;&#034;box1&#034;&gt;&lt;\/div&gt;         &lt;!&#8211; \u7a7a\u5143\u7d20&#xff0c;\u5339\u914d :empty &#8211;&gt;<br \/>\n&lt;div class&#061;&#034;box2&#034;&gt; &lt;\/div&gt;        &lt;!&#8211; \u5305\u542b\u7a7a\u683c&#xff0c;\u4e0d\u5339\u914d &#8211;&gt;<br \/>\n&lt;div class&#061;&#034;box3&#034;&gt;&lt;!&#8211; \u6ce8\u91ca &#8211;&gt;&lt;\/div&gt; &lt;!&#8211; \u5305\u542b\u6ce8\u91ca&#xff0c;\u4e0d\u5339\u914d &#8211;&gt;<br \/>\n&lt;p class&#061;&#034;text&#034;&gt;&lt;\/p&gt;             &lt;!&#8211; \u7a7a\u6bb5\u843d&#xff0c;\u5339\u914d :empty &#8211;&gt; <\/p>\n<h3 style=\"text-align:center\">\u4f2a\u5143\u7d20\u9009\u62e9\u5668<\/h3>\n<h4>:before\u548c:after<\/h4>\n<p>\u7528\u4e8e\u5728\u6307\u5b9a\u5143\u7d20\u7684\u5185\u5bb9\u524d\u6216\u540e\u52a8\u6001\u751f\u6210\u865a\u62df\u5185\u5bb9\u3002\u5b83\u4eec\u5fc5\u987b\u914d\u5408\u00a0content\u00a0\u5c5e\u6027\u4f7f\u7528&#xff0c;\u751f\u6210\u7684\u5185\u5bb9\u5c5e\u4e8e\u6587\u6863\u6d41\u7684\u4e00\u90e8\u5206&#xff0c;\u4f46\u4e0d\u4f1a\u51fa\u73b0\u5728 HTML \u6e90\u7801\u4e2d\u3002<\/p>\n<h5>\u793a\u4f8b\u4e00&#xff08;\u5185\u5bb9\u524d\u540e\u6dfb\u52a0\u7b26\u53f7&#xff09;<\/h5>\n<p>.quote:before {<br \/>\n  content: &#034;\u201c&#034;; \/* \u5de6\u5f15\u53f7 *\/<br \/>\n  font-size: 1.5em;<br \/>\n  color: #666;<br \/>\n  margin-right: 5px;<br \/>\n}<\/p>\n<p>.quote:after {<br \/>\n  content: &#034;\u201d&#034;; \/* \u53f3\u5f15\u53f7 *\/<br \/>\n  font-size: 1.5em;<br \/>\n  color: #666;<br \/>\n  margin-left: 5px;<br \/>\n} <\/p>\n<p>\u5728\u751f\u6210\u7684\u5de6\u5f15\u53f7\u00a0&#034;\u201c&#034;\u00a0\u53f3\u4fa7\u6dfb\u52a0\u4e86 5 \u50cf\u7d20\u7684\u7a7a\u767d\u533a\u57df\u00a0<\/p>\n<p>\u5728\u751f\u6210\u7684\u53f3\u5f15\u53f7\u00a0&#034;\u201d&#034;\u00a0\u5de6\u4fa7\u6dfb\u52a0\u4e86 5 \u50cf\u7d20\u7684\u7a7a\u767d\u533a\u57df<\/p>\n<p>&lt;p class&#061;&#034;quote&#034;&gt;CSS \u4f2a\u5143\u7d20\u5f88\u5f3a\u5927&#xff01;&lt;\/p&gt; <\/p>\n<h5 style=\"background-color:transparent\">\u00a0\u793a\u4f8b\u4e8c&#xff08;\u6e05\u9664\u6d6e\u52a8&#xff09;<\/h5>\n<p>.clearfix:after {<br \/>\n  content: &#034;&#034;;<br \/>\n  display: block; \/* \u8f6c\u6362\u4e3a\u5757\u7ea7\u5143\u7d20 *\/<br \/>\n  clear: both; \/* \u6e05\u9664\u6d6e\u52a8 *\/<br \/>\n  height: 0;<br \/>\n  visibility: hidden; \/* \u9690\u85cf\u5185\u5bb9 *\/<br \/>\n} <\/p>\n<ul>\n<li>content\u00a0\u5c5e\u6027\u662f\u00a0:before\u00a0\u548c\u00a0:after\u00a0\u4f2a\u5143\u7d20\u5fc5\u987b\u8bbe\u7f6e\u7684\u5c5e\u6027&#xff0c;\u7528\u4e8e\u5b9a\u4e49\u63d2\u5165\u7684\u5185\u5bb9\u3002\u8fd9\u91cc\u5c06\u5176\u8bbe\u7f6e\u4e3a\u7a7a\u5b57\u7b26\u4e32\u00a0&#034;&#034;&#xff0c;\u8868\u793a\u63d2\u5165\u4e00\u4e2a\u7a7a\u7684\u5185\u5bb9\u3002\u56e0\u4e3a\u6211\u4eec\u53ea\u9700\u8981\u5229\u7528\u8fd9\u4e2a\u865a\u62df\u5143\u7d20\u6765\u6e05\u9664\u6d6e\u52a8&#xff0c;\u5e76\u4e0d\u9700\u8981\u663e\u793a\u5177\u4f53\u7684\u6587\u672c\u6216\u5176\u4ed6\u5185\u5bb9\u3002<\/li>\n<li>\u4f2a\u5143\u7d20\u9ed8\u8ba4\u7684\u00a0display\u00a0\u5c5e\u6027\u503c\u662f\u00a0inline&#xff0c;\u5373\u884c\u5185\u5143\u7d20\u3002\u800c\u884c\u5185\u5143\u7d20\u4e0d\u80fd\u8bbe\u7f6e\u5bbd\u5ea6\u3001\u9ad8\u5ea6\u7b49\u76d2\u6a21\u578b\u5c5e\u6027&#xff0c;\u4e3a\u4e86\u8ba9\u8fd9\u4e2a\u865a\u62df\u5143\u7d20\u80fd\u591f\u6b63\u5e38\u53d1\u6325\u6e05\u9664\u6d6e\u52a8\u7684\u4f5c\u7528&#xff0c;\u9700\u8981\u5c06\u5176\u8f6c\u6362\u4e3a\u5757\u7ea7\u5143\u7d20&#xff08;display: block&#xff09;&#xff0c;\u8fd9\u6837\u5b83\u5c31\u53ef\u4ee5\u50cf\u666e\u901a\u7684\u5757\u7ea7\u5143\u7d20\u4e00\u6837\u5360\u636e\u4e00\u884c\u7a7a\u95f4\u3002<\/li>\n<li>clear: both\u00a0\u8868\u793a\u5143\u7d20\u7684\u5de6\u53f3\u4e24\u4fa7\u90fd\u4e0d\u5141\u8bb8\u6709\u6d6e\u52a8\u5143\u7d20\u3002\u5f53\u8fd9\u4e2a\u865a\u62df\u5143\u7d20\u5e94\u7528\u4e86\u00a0clear: both\u00a0\u540e&#xff0c;\u5b83\u4f1a\u88ab\u5f3a\u5236\u79fb\u52a8\u5230\u6240\u6709\u6d6e\u52a8\u5143\u7d20\u7684\u4e0b\u65b9&#xff0c;\u4ece\u800c\u6491\u5f00\u7236\u5143\u7d20\u7684\u9ad8\u5ea6&#xff0c;\u89e3\u51b3\u9ad8\u5ea6\u584c\u9677\u7684\u95ee\u9898\u3002<\/li>\n<li>\u7531\u4e8e\u6211\u4eec\u53ea\u662f\u5229\u7528\u8fd9\u4e2a\u865a\u62df\u5143\u7d20\u6765\u6e05\u9664\u6d6e\u52a8&#xff0c;\u5e76\u4e0d\u5e0c\u671b\u5b83\u5728\u9875\u9762\u4e0a\u5360\u636e\u989d\u5916\u7684\u9ad8\u5ea6\u7a7a\u95f4&#xff0c;\u6240\u4ee5\u5c06\u5176\u9ad8\u5ea6\u8bbe\u7f6e\u4e3a 0<\/li>\n<li>\u8fd9\u91cc\u5c06\u865a\u62df\u5143\u7d20\u7684\u00a0visibility\u00a0\u8bbe\u7f6e\u4e3a\u00a0hidden&#xff0c;\u662f\u4e3a\u4e86\u786e\u4fdd\u5b83\u4e0d\u4f1a\u5728\u9875\u9762\u4e0a\u663e\u793a\u51fa\u6765&#xff0c;\u540c\u65f6\u53c8\u80fd\u4fdd\u6301\u5176\u5728\u6587\u6863\u6d41\u4e2d\u7684\u4f4d\u7f6e&#xff0c;\u4ee5\u5b9e\u73b0\u6e05\u9664\u6d6e\u52a8\u7684\u6548\u679c\u3002<\/li>\n<\/ul>\n<h5>\u00a0\u793a\u4f8b\u4e09&#xff08;\u6dfb\u52a0\u8fb9\u6846&#xff09;<\/h5>\n<p>.box {<br \/>\n  position: relative;<br \/>\n  padding: 20px;<br \/>\n}<\/p>\n<p>.box:before {<br \/>\n  content: &#034;&#034;;<br \/>\n  position: absolute;<br \/>\n  top: 0;<br \/>\n  left: 0;<br \/>\n  width: 100%;<br \/>\n  height: 100%;<br \/>\n  border: 2px solid red; \/* \u4e3a\u5143\u7d20\u6dfb\u52a0\u8fb9\u6846 *\/<br \/>\n  z-index: -1; \/* \u7f6e\u4e8e\u5143\u7d20\u4e0b\u65b9 *\/<br \/>\n} <\/p>\n<ul>\n<li>position\u00a0\u5c5e\u6027\u7528\u4e8e\u8bbe\u7f6e\u5143\u7d20\u7684\u5b9a\u4f4d\u65b9\u5f0f&#xff0c;relative\u00a0\u8868\u793a\u76f8\u5bf9\u5b9a\u4f4d\u3002\u5f53\u4e00\u4e2a\u5143\u7d20\u8bbe\u7f6e\u4e3a\u76f8\u5bf9\u5b9a\u4f4d\u65f6&#xff0c;\u5b83\u4ecd\u7136\u4f1a\u5728\u6587\u6863\u6d41\u4e2d\u5360\u636e\u539f\u672c\u7684\u4f4d\u7f6e&#xff0c;\u4f46\u53ef\u4ee5\u901a\u8fc7\u00a0top\u3001right\u3001bottom\u00a0\u548c\u00a0left\u00a0\u5c5e\u6027\u76f8\u5bf9\u4e8e\u5176\u6b63\u5e38\u4f4d\u7f6e\u8fdb\u884c\u504f\u79fb\u3002<\/li>\n<li>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d&#xff0c;\u5c06\u00a0.box\u00a0\u8bbe\u7f6e\u4e3a\u76f8\u5bf9\u5b9a\u4f4d\u662f\u4e3a\u00a0.box:before\u00a0\u4f2a\u5143\u7d20\u7684\u7edd\u5bf9\u5b9a\u4f4d\u63d0\u4f9b\u4e00\u4e2a\u53c2\u8003\u70b9\u3002\u56e0\u4e3a\u7edd\u5bf9\u5b9a\u4f4d\u7684\u5143\u7d20\u4f1a\u76f8\u5bf9\u4e8e\u6700\u8fd1\u7684\u5df2\u5b9a\u4f4d&#xff08;\u5373\u00a0position\u00a0\u5c5e\u6027\u503c\u4e0d\u4e3a\u00a0static&#xff09;\u7684\u7956\u5148\u5143\u7d20\u8fdb\u884c\u5b9a\u4f4d&#xff0c;\u8fd9\u91cc\u00a0.box\u00a0\u5c31\u662f\u00a0.box:before\u00a0\u4f2a\u5143\u7d20\u7684\u5df2\u5b9a\u4f4d\u7956\u5148\u5143\u7d20<\/li>\n<li>\u00a0absolute\u00a0\u8868\u793a\u7edd\u5bf9\u5b9a\u4f4d\u3002\u5f53\u00a0.box:before\u00a0\u4f2a\u5143\u7d20\u8bbe\u7f6e\u4e3a\u7edd\u5bf9\u5b9a\u4f4d\u540e&#xff0c;\u5b83\u4f1a\u8131\u79bb\u6b63\u5e38\u7684\u6587\u6863\u6d41&#xff0c;\u5e76\u4e14\u76f8\u5bf9\u4e8e\u6700\u8fd1\u7684\u5df2\u5b9a\u4f4d\u7956\u5148\u5143\u7d20&#xff08;\u5373\u00a0.box\u00a0\u5143\u7d20&#xff09;\u8fdb\u884c\u5b9a\u4f4d<\/li>\n<li>z-index\u00a0\u5c5e\u6027\u7528\u4e8e\u8bbe\u7f6e\u5143\u7d20\u5728 z \u8f74\u4e0a\u7684\u5806\u53e0\u987a\u5e8f\u3002\u503c\u8d8a\u5927\u7684\u5143\u7d20\u4f1a\u663e\u793a\u5728\u503c\u8f83\u5c0f\u7684\u5143\u7d20\u7684\u4e0a\u65b9\u3002\u8fd9\u91cc\u5c06\u00a0.box:before\u00a0\u4f2a\u5143\u7d20\u7684\u00a0z-index\u00a0\u8bbe\u7f6e\u4e3a\u00a0-1&#xff0c;\u8868\u793a\u5c06\u5176\u7f6e\u4e8e\u00a0.box\u00a0\u5143\u7d20\u7684\u4e0b\u65b9&#xff0c;\u8fd9\u6837\u4f2a\u5143\u7d20\u7684\u8fb9\u6846\u5c31\u4f1a\u663e\u793a\u5728\u00a0.box\u00a0\u5143\u7d20\u5185\u5bb9\u7684\u540e\u9762\u3002<\/li>\n<\/ul>\n<h3 style=\"text-align:center\">\u62d3\u5c55\u5c5e\u6027\u9009\u62e9\u5668<\/h3>\n<h4>^&#061;\u524d\u7f00\u5339\u914d\u9009\u62e9\u5668<\/h4>\n<p>a[href^&#061;&#034;https:\/\/&#034;] {<br \/>\n    color: green;<br \/>\n} <\/p>\n<p>\u89e3\u91ca&#xff1a;\u8fd9\u6bb5\u4ee3\u7801\u4f1a\u9009\u4e2d\u6240\u6709\u00a0href\u00a0\u5c5e\u6027\u503c\u4ee5\u00a0&#034;https:\/\/&#034;\u00a0\u5f00\u5934\u7684\u00a0&lt;a&gt;\u00a0\u5143\u7d20&#xff0c;\u5e76\u5c06\u5176\u6587\u672c\u989c\u8272\u8bbe\u7f6e\u4e3a\u7eff\u8272&#xff0c;\u5e38\u7528\u4e8e\u7a81\u51fa\u663e\u793a\u5b89\u5168\u94fe\u63a5\u3002<\/p>\n<h4>$&#061;\u540e\u7f00\u5339\u914d\u9009\u62e9\u5668<\/h4>\n<p>img[src$&#061;&#034;.jpg&#034;] {<br \/>\n    border: 2px solid blue;<br \/>\n} <\/p>\n<h4>*&#061;\u5305\u542b\u5339\u914d\u9009\u62e9\u5668<\/h4>\n<p>input[placeholder*&#061;&#034;name&#034;] {<br \/>\n    background-color: lightyellow;<br \/>\n} <\/p>\n<p>\u00a0\u89e3\u91ca&#xff1a;\u8fd9\u6bb5\u4ee3\u7801\u4f1a\u9009\u4e2d\u6240\u6709\u00a0placeholder\u00a0\u5c5e\u6027\u503c\u5305\u542b\u00a0&#034;name&#034;\u00a0\u5b50\u5b57\u7b26\u4e32\u7684\u00a0&lt;input&gt;\u00a0\u5143\u7d20&#xff0c;\u5e76\u5c06\u5176\u80cc\u666f\u989c\u8272\u8bbe\u7f6e\u4e3a\u6d45\u9ec4\u8272&#xff0c;\u65b9\u4fbf\u5bf9\u7279\u5b9a\u63d0\u793a\u4fe1\u606f\u7684\u8f93\u5165\u6846\u8fdb\u884c\u6837\u5f0f\u5904\u7406<\/p>\n<h4>~&#061;\u5355\u8bcd\u5305\u542b\u9009\u62e9\u5668<\/h4>\n<p>div[class~&#061;&#034;highlight&#034;] {<br \/>\n    font-weight: bold;<br \/>\n} <\/p>\n<h4>|&#061;\u8fde\u5b57\u7b26\u524d\u7f00\u5339\u914d\u9009\u62e9\u5668<\/h4>\n<p>p[lang|&#061;&#034;en&#034;] {<br \/>\n    font-family: Arial, sans-serif;<br \/>\n} <\/p>\n<p>\u89e3\u91ca&#xff1a;\u6b64\u4ee3\u7801\u4f1a\u9009\u4e2d\u6240\u6709\u00a0lang\u00a0\u5c5e\u6027\u503c\u4ee5\u00a0&#034;en&#034;\u00a0\u5f00\u5934&#xff08;\u5982\u00a0&#034;en&#034;\u3001&#034;en-US&#034;\u00a0\u7b49&#xff09;\u7684\u00a0&lt;p&gt;\u00a0\u5143\u7d20&#xff0c;\u5e76\u5c06\u5176\u5b57\u4f53\u8bbe\u7f6e\u4e3a Arial \u6216\u65e0\u886c\u7ebf\u5b57\u4f53&#xff0c;\u5e38\u7528\u4e8e\u6839\u636e\u8bed\u8a00\u4ee3\u7801\u6765\u8bbe\u7f6e\u6837\u5f0f\u3002<\/p>\n<h4>&#061;\u7cbe\u786e\u5339\u914d\u9009\u62e9\u5668<\/h4>\n<p>input[type&#061;&#034;password&#034;] {<br \/>\n    -webkit-text-security: disc;<br \/>\n} <\/p>\n<h4>\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u7684\u9009\u62e9\u5668<\/h4>\n<p>\u5728\u5c5e\u6027\u9009\u62e9\u5668\u540e\u9762\u6dfb\u52a0\u00a0i\u00a0\u4fee\u9970\u7b26&#xff0c;\u53ef\u4ee5\u5b9e\u73b0\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u7684\u5339\u914d\u3002<\/p>\n<p>a[href&#061;&#034;https:\/\/example.com&#034; i] {<br \/>\n    text-decoration: underline;<br \/>\n} <\/p>\n<hr \/>\n<h2 style=\"text-align:center\">\u6587\u672c<\/h2>\n<hr \/>\n<h3 style=\"text-align:center\">\u6587\u672c\u5916\u89c2\u5c5e\u6027<\/h3>\n<h4>font<\/h4>\n<h6>font-size<\/h6>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td>\u76f8\u5bf9\u957f\u5ea6\u5355\u4f4d<\/td>\n<td>\u8bf4\u660e<\/td>\n<\/tr>\n<tr>\n<td>em<\/td>\n<td>\u5f53\u524d\u5bf9\u8c61\u5185\u5b57\u4f53\u5c3a\u5bf8<\/td>\n<\/tr>\n<tr>\n<td>px<\/td>\n<td>\u50cf\u7d20<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td>\u7edd\u5bf9\u957f\u5ea6\u5355\u4f4d<\/td>\n<td>\u8bf4\u660e<\/td>\n<\/tr>\n<tr>\n<td>in<\/td>\n<td>\u82f1\u5bf8<\/td>\n<\/tr>\n<tr>\n<td>cm<\/td>\n<td>cm<\/td>\n<\/tr>\n<tr>\n<td>mm<\/td>\n<td>mm<\/td>\n<\/tr>\n<tr>\n<td>pt<\/td>\n<td>\u70b9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h6>font-family<\/h6>\n<p>\u7528\u4e8e\u8bbe\u7f6e\u5b57\u4f53\u3002\u7f51\u9875\u4e2d\u5e38\u7528\u7684\u5b57\u4f53\u6709 \u5b8b\u4f53\u3001\u5fae\u8f6f\u96c5\u9ed1\u3001\u9ed1\u4f53\u7b49\u3002<\/p>\n<h6>font-weight<\/h6>\n<p>\u5b9a\u4e49\u5b57\u4f53\u7684\u7c97\u7ec6\u3002<\/p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td>\u503c<\/td>\n<td>\u8bf4\u660e<\/td>\n<\/tr>\n<tr>\n<td>normal<\/td>\n<td>\u9ed8\u8ba4<\/td>\n<\/tr>\n<tr>\n<td>bold<\/td>\n<td>\u7c97\u4f53<\/td>\n<\/tr>\n<tr>\n<td>bloder<\/td>\n<td>\u66f4\u7c97<\/td>\n<\/tr>\n<tr>\n<td>lighter<\/td>\n<td>\u66f4\u7ec6<\/td>\n<\/tr>\n<tr>\n<td>100~900<\/td>\n<td>\n<p>400\u7b49\u540c\u4e8enormal<\/p>\n<p>\u00a0700 \u7b49\u540c\u4e8ebold<\/p>\n<p>\u00a0 \u503c\u8d8a\u5927\u5b57\u4f53\u8d8a\u7c97<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h6>font-style<\/h6>\n<p>\u5b9a\u4e49\u5b57\u4f53\u98ce\u683c&#xff0c;\u5982\u8bbe\u7f6e\u659c\u4f53\u3001\u503e\u659c \u6216\u6b63\u5e38\u5b57\u4f53\u3002<\/p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td>\u503c<\/td>\n<td>\u8bf4\u660e<\/td>\n<\/tr>\n<tr>\n<td>normal<\/td>\n<td>\u9ed8\u8ba4<\/td>\n<\/tr>\n<tr>\n<td>italic<\/td>\n<td>\u659c\u4f53<\/td>\n<\/tr>\n<tr>\n<td>oblique<\/td>\n<td>\u503e\u659c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h6>&#064;font-face<\/h6>\n<p>\u5b9a\u4e49\u670d\u52a1 \u5668\u5b57\u4f53\u3002<\/p>\n<p>\u901a\u8fc7&#064;font-face\u5c5e\u6027&#xff0c;\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u7528\u6237\u8ba1 \u7b97\u673a\u672a\u5b89\u88c5\u5b57\u4f53\u65f6&#xff0c;\u4f7f\u7528\u4efb\u4f55\u559c\u6b22\u7684\u5b57\u4f53\u3002<\/p>\n<p>&lt;head&gt;<br \/>\n   &lt;style&gt;<br \/>\n      &#064;font-face{<br \/>\n            font-family:\u5b57\u540d\u4f53\u79f0<br \/>\n            src:\u8def\u5f84<br \/>\n           }<br \/>\n   &lt;\/style&gt;<br \/>\n&lt;\/head&gt; <\/p>\n<h5>font-variant<\/h5>\n<p>\u7528\u4e8e\u8c03\u6574\u5b57\u7b26\u7684\u663e\u793a\u5f62\u5f0f&#xff08;\u5982\u5c0f\u578b\u5927\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u98ce\u683c\u7b49&#xff09;<\/p>\n<table>\n<tr>\u503c\u63cf\u8ff0<\/tr>\n<tbody>\n<tr>\n<td>normal&#xff08;\u9ed8\u8ba4&#xff09;<\/td>\n<td>\u5e38\u89c4\u5b57\u4f53&#xff0c;\u4e0d\u542f\u7528\u4efb\u4f55\u53d8\u4f53<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>small-caps<\/td>\n<td>\u5c0f\u5199\u5b57\u6bcd\u8f6c\u4e3a\u5c0f\u578b\u5927\u5199&#xff08;\u5927\u5199\u5b57\u6bcd\u4fdd\u6301\u539f\u5927\u5c0f&#xff09;<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>lining-nums<\/td>\n<td>\u6570\u5b57\u4e0e\u5927\u5199\u5b57\u6bcd\u5bf9\u9f50&#xff08;\u7b49\u9ad8\u6570\u5b57&#xff0c;\u9002\u5408\u6807\u9898&#xff09;<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>oldstyle-nums<\/td>\n<td>\u6570\u5b57\u4e0e\u5c0f\u5199\u5b57\u6bcd\u5bf9\u9f50&#xff08;\u4f20\u7edf\u6570\u5b57&#xff0c;\u6709\u5347 \/ \u964d\u90e8&#xff0c;\u9002\u5408\u6b63\u6587&#xff09;<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>tabular-nums<\/td>\n<td>\u6570\u5b57\u7b49\u5bbd\u6392\u5217&#xff08;\u9002\u5408\u8868\u683c\u5bf9\u9f50&#xff09;<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>proportional-nums<\/td>\n<td>\u6570\u5b57\u5bbd\u5ea6\u4e0d\u7b49&#xff08;\u9ed8\u8ba4\u6bd4\u4f8b&#xff09;<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>petite-caps<\/td>\n<td>\u6bd4\u00a0small-caps\u00a0\u66f4\u5c0f\u7684\u5c0f\u578b\u5927\u5199&#xff08;\u9700\u5b57\u4f53\u652f\u6301&#xff09;<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>font\u7efc\u5408\u5c5e\u6027<\/h5>\n<p>\u5728\u4e00\u884c\u4ee3\u7801\u4e2d\u540c\u65f6\u8bbe\u7f6e\u5b57\u4f53\u7684\u6837\u5f0f\u3001\u7c97\u7ec6\u3001\u5927\u5c0f\u3001\u884c\u9ad8\u548c\u5b57\u4f53\u7cfb\u5217&#xff0c;\u7b80\u5316\u4ee3\u7801\u5e76\u63d0\u9ad8\u53ef\u8bfb\u6027<\/p>\n<p>font: [font-style] [font-variant] [font-weight] [font-size\/line-height] [font-family];<\/p>\n<ul>\n<li>\u5fc5\u9009&#xff1a;font-size\u00a0\u548c\u00a0font-family\u00a0\u5fc5\u987b\u5305\u542b&#xff0c;\u5176\u4ed6\u4e3a\u53ef\u9009\u3002<\/li>\n<li>\u987a\u5e8f&#xff1a;\u5c5e\u6027\u987a\u5e8f\u56fa\u5b9a&#xff0c;\u9057\u6f0f\u7684\u5c5e\u6027\u4f1a\u4f7f\u7528\u9ed8\u8ba4\u503c&#xff08;\u5982\u00a0font-style: normal&#xff09;\u3002<\/li>\n<\/ul>\n<p>&lt;p class&#061;&#034;text&#034;&gt;\u7efc\u5408\u5c5e\u6027\u793a\u4f8b\u6587\u672c&lt;\/p&gt;<br \/>\n&lt;style&gt;<br \/>\n.text {<br \/>\n  font: italic small-caps bold 1.2rem\/1.6 &#034;Segoe UI&#034;, sans-serif;<br \/>\n  \/* \u7b49\u4ef7\u4e8e&#xff1a;<br \/>\n  font-style: italic;<br \/>\n  font-variant: small-caps;<br \/>\n  font-weight: bold;<br \/>\n  font-size: 1.2rem;<br \/>\n  line-height: 1.6;<br \/>\n  font-family: &#034;Segoe UI&#034;, sans-serif;<br \/>\n  *\/<br \/>\n}<br \/>\n&lt;\/style&gt; <\/p>\n<h4>color<\/h4>\n<p>\u5b9a\u4e49\u6587\u672c\u7684\u989c\u8272<\/p>\n<ul>\n<li>\u00a0\u9884\u5b9a\u4e49\u7684\u989c\u8272\u503c&#xff0c;\u5982red&#xff0c;green&#xff0c;blue\u7b49\u3002<\/li>\n<li>\u00a0\u5341\u516d\u8fdb\u5236&#xff0c;\u5982#FF6600&#xff08;\u53ef\u7b80\u5199\u4e3a#F60&#xff09;&#xff0c;#29D794&#xff08;\u4e0d\u53ef\u7b80\u5199&#xff09;\u3002<\/li>\n<li>\u00a0rgb\u4ee3\u7801&#xff0c;\u5982\u7ea2\u8272\u53ef\u4ee5\u8868\u793a\u4e3argb(255,0,0)\u6216rgb(100%,0%,0%)\u3002<\/li>\n<li>rgba\u4ee3\u7801&#xff0c;\u7ea2\u8272\u5e76\u4e14\u900f\u660e\u5ea6\u4e3a1\u3002rgba(255,0,0,1),\u6216rgba(100%,0%,0%,100%)\u3002<\/li>\n<\/ul>\n<p>\u7ea2, \u7eff, \u84dd, \u900f\u660e\u5ea6 <\/p>\n<p>\u6700\u540e\u4e00\u4e2a\u503c\u53d6&#xff08;0~1&#xff09;&#xff0c;\u8d8a\u5927\u8d8a\u4e0d\u900f\u660e\u3002\u00a0<\/p>\n<h4>spacing<\/h4>\n<h5>letter-spacing<\/h5>\n<p>\u5b9a\u4e49\u5b57\u95f4\u8ddd&#xff0c;\u5c31\u662f<span style=\"color:#fe2c24\">\u5b57\u7b26\u4e0e\u5b57\u7b26<\/span>\u4e4b\u95f4\u7684\u7a7a\u767d\u3002<\/p>\n<p>\u5141\u8bb8\u4f7f\u7528\u8d1f\u503c<\/p>\n<h5>word-spacing<\/h5>\n<p>\u5b9a\u4e49\u82f1\u6587\u5355\u8bcd\u4e4b\u95f4\u7684\u95f4\u8ddd&#xff0c;\u5bf9\u4e2d\u6587\u5b57\u7b26\u65e0\u6548<\/p>\n<p>\u548cletter-spacing\u4e00\u6837&#xff0c;\u5176\u5c5e\u6027\u503c\u53ef\u4e3a\u4e0d\u540c \u5355\u4f4d\u7684\u6570\u503c&#xff0c;\u5141\u8bb8\u4f7f\u7528\u8d1f\u503c&#xff0c;\u9ed8\u8ba4\u4e3anormal\u3002<\/p>\n<h4>line-height<\/h4>\n<p>\u8bbe\u7f6e\u884c\u95f4\u8ddd&#xff0c;\u5c31\u662f\u884c\u4e0e\u884c\u4e4b\u95f4\u7684\u8ddd\u79bb&#xff0c;\u5373\u5b57\u7b26 \u7684\u5782\u76f4\u95f4\u8ddd&#xff0c;\u4e00\u822c\u79f0\u4e3a<span style=\"color:#fe2c24\">\u884c\u9ad8<\/span>\u3002<\/p>\n<ul>\n<li>\u6570\u503c&#xff08;\u63a8\u8350&#xff09;&#xff1a;\u65e0\u5355\u4f4d\u503c&#xff08;\u5982\u00a01.5&#xff09;&#xff0c;\u57fa\u4e8e\u5b57\u4f53\u5927\u5c0f\u8ba1\u7b97&#xff0c;\u7ee7\u627f\u65f6\u66f4\u7a33\u5b9a\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&#xff08;\u9002\u914d\u6240\u6709\u5b50\u5143\u7d20\u5b57\u4f53\u5927\u5c0f&#xff09;<\/li>\n<li>\u767e\u5206\u6bd4&#xff1a;\u57fa\u4e8e\u7236\u5143\u7d20\u5b57\u4f53\u5927\u5c0f&#xff08;\u5982\u00a0150%&#xff09;&#xff0c;\u7ee7\u627f\u65f6\u53ef\u80fd\u5bfc\u81f4\u5d4c\u5957\u95ee\u9898 \u00a0 \u00a0(\u907f\u514d\u5728\u00a0body\u00a0\u7528\u767e\u5206\u6bd4&#xff0c;\u6539\u7528\u6570\u503c&#xff01;)<\/li>\n<li>\u957f\u5ea6\u5355\u4f4d&#xff1a;\u56fa\u5b9a\u503c&#xff08;\u5982\u00a024px&#xff09;&#xff0c;\u4e0d\u968f\u5b57\u4f53\u5927\u5c0f\u7f29\u653e&#xff0c;\u9002\u5408\u7cbe\u786e\u63a7\u5236 \u00a0&#xff08;\u7d27\u51d1\u4ee3\u7801\u6392\u7248&#xff09;<\/li>\n<\/ul>\n<h4>text<\/h4>\n<h5>text-form<\/h5>\n<p>\u63a7\u5236\u82f1\u6587\u5b57\u7b26\u7684\u5927\u5c0f\u5199\u3002<\/p>\n<ul>\n<li>none&#xff1a;\u4e0d\u8f6c\u6362&#xff08;\u9ed8\u8ba4\u503c&#xff09;\u3002<\/li>\n<li>\u00a0capitalize&#xff1a;\u9996\u5b57\u6bcd\u5927\u5199\u3002<\/li>\n<li>\u00a0uppercase&#xff1a;\u5168\u90e8\u5b57\u7b26\u8f6c\u6362\u4e3a\u5927\u5199\u3002<\/li>\n<li>\u00a0lowercase&#xff1a;\u5168\u90e8\u5b57\u7b26\u8f6c\u6362\u4e3a\u5c0f\u5199\u3002<\/li>\n<\/ul>\n<h5>text-decoration<\/h5>\n<p>\u8bbe\u7f6e\u6587\u672c\u7684\u4e0b\u5212\u7ebf&#xff0c;\u4e0a\u5212\u7ebf&#xff0c;\u5220\u9664\u7ebf\u7b49\u88c5\u9970\u6548\u679c<\/p>\n<ul>\n<li>\u00a0none&#xff1a;\u6ca1\u6709\u88c5\u9970&#xff08;\u6b63\u5e38\u6587\u672c\u9ed8\u8ba4\u503c&#xff09;\u3002<\/li>\n<li>\u00a0underline&#xff1a;\u4e0b\u5212\u7ebf\u3002<\/li>\n<li>\u00a0overline&#xff1a;\u4e0a\u5212\u7ebf\u3002<\/li>\n<li>\u00a0line-through&#xff1a;\u5220\u9664\u7ebf\u3002<\/li>\n<\/ul>\n<h5>text-align<\/h5>\n<p>\u8bbe\u7f6e\u6587\u672c\u5bf9\u9f50\u65b9\u5f0f\u3002<\/p>\n<ul>\n<li>\u00a0left&#xff1a;\u5de6\u5bf9\u9f50&#xff08;\u9ed8\u8ba4\u503c&#xff09;<\/li>\n<li>\u00a0right&#xff1a;\u53f3\u5bf9\u9f50\u3002<\/li>\n<li>\u00a0center&#xff1a;\u5c45\u4e2d\u5bf9\u9f50\u3002<\/li>\n<\/ul>\n<h5>text-indent<\/h5>\n<p>\u8bbe\u7f6e\u6587\u672c\u9996\u884c\u7f29\u8fdb\u3002<\/p>\n<p>\u5176\u503c\u53ef\u4e3a\u6570\u503c\u3001em\u5b57\u7b26\u5bbd\u5ea6\u3001\u6216\u76f8\u5bf9\u4e8e\u6d4f\u89c8\u5668\u7a97\u53e3\u5bbd\u5ea6\u7684\u767e\u5206\u6bd4%&#xff0c; \u5141\u8bb8\u4f7f\u7528\u8d1f\u503c<\/p>\n<h5>text-shadow<\/h5>\n<p>\u6dfb\u52a0\u6587\u672c\u9634\u5f71<\/p>\n<p>text-shadow: h-shadow v-shadow blur-radius color;<\/p>\n<ul>\n<li>h-shadow&#xff1a;\u5fc5\u9700&#xff0c;\u5b9a\u4e49\u6c34\u5e73\u9634\u5f71\u7684\u4f4d\u7f6e&#xff0c;\u5141\u8bb8\u4f7f\u7528\u8d1f\u503c\u3002\u6b63\u503c\u8868\u793a\u9634\u5f71\u5728\u53f3\u4fa7&#xff0c;\u8d1f\u503c\u8868\u793a\u5728\u5de6\u4fa7\u3002<\/li>\n<li>v-shadow&#xff1a;\u5fc5\u9700&#xff0c;\u5b9a\u4e49\u5782\u76f4\u9634\u5f71\u7684\u4f4d\u7f6e&#xff0c;\u540c\u6837\u5141\u8bb8\u4f7f\u7528\u8d1f\u503c\u3002\u6b63\u503c\u8868\u793a\u9634\u5f71\u5728\u4e0b\u65b9&#xff0c;\u8d1f\u503c\u8868\u793a\u5728\u4e0a\u65b9\u3002<\/li>\n<li>blur-radius&#xff1a;\u53ef\u9009&#xff0c;\u5b9a\u4e49\u9634\u5f71\u7684\u6a21\u7cca\u534a\u5f84&#xff0c;\u503c\u8d8a\u5927&#xff0c;\u9634\u5f71\u8d8a\u6a21\u7cca\u3002\u9ed8\u8ba4\u503c\u4e3a 0&#xff0c;\u8868\u793a\u6ca1\u6709\u6a21\u7cca\u6548\u679c\u3002<\/li>\n<li>color&#xff1a;\u53ef\u9009&#xff0c;\u5b9a\u4e49\u9634\u5f71\u7684\u989c\u8272\u3002\u5982\u679c\u7701\u7565&#xff0c;\u5c06\u4f7f\u7528\u6d4f\u89c8\u5668\u7684\u9ed8\u8ba4\u989c\u8272&#xff0c;\u901a\u5e38\u662f\u9ed1\u8272\u3002<\/li>\n<\/ul>\n<h5>text-overflow<\/h5>\n<p>\u7528\u4e8e\u5904\u7406\u6ea2\u51fa\u7684\u6587\u672c<\/p>\n<p><span style=\"color:#fe2c24\">text-overflow\u00a0\u901a\u5e38\u9700\u8981\u548c\u53e6\u5916\u4e24\u4e2a\u5c5e\u6027\u4e00\u8d77\u4f7f\u7528\u624d\u80fd\u751f\u6548&#xff1a;<\/span><\/p>\n<ul>\n<li>white-space: nowrap&#xff1a;\u963b\u6b62\u6587\u672c\u6362\u884c&#xff0c;\u4f7f\u6587\u672c\u5728\u4e00\u884c\u5185\u663e\u793a\u3002<\/li>\n<li>overflow: hidden&#xff1a;\u9690\u85cf\u8d85\u51fa\u5bb9\u5668\u8fb9\u754c\u7684\u5185\u5bb9\u3002<\/li>\n<\/ul>\n<p>text-overflow: clip | ellipsis | &lt;string&gt;;<\/p>\n<ul>\n<li>clip&#xff1a;\u9ed8\u8ba4\u503c&#xff0c;\u76f4\u63a5\u88c1\u526a\u6ea2\u51fa\u5bb9\u5668\u7684\u6587\u672c&#xff0c;\u4e0d\u4f1a\u7ed9\u51fa\u4efb\u4f55\u63d0\u793a\u3002<\/li>\n<li>ellipsis&#xff1a;\u4f1a\u7528\u7701\u7565\u53f7&#xff08;&#8230;&#xff09;\u6765\u8868\u793a\u88ab\u622a\u65ad\u7684\u90e8\u5206\u3002<\/li>\n<li>&lt;string&gt;&#xff1a;\u6307\u5b9a\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684\u5b57\u7b26\u4e32\u66ff\u4ee3\u7701\u7565\u53f7\u663e\u793a\u5728\u622a\u65ad\u5904\u3002<\/li>\n<\/ul>\n<h4>white-space<\/h4>\n<p>\u8bbe\u7f6e\u7a7a\u767d\u7b26\u7684\u5904\u7406\u65b9\u5f0f\u3002<\/p>\n<h5>1.\u00a0normal&#xff08;\u9ed8\u8ba4\u503c&#xff09;<\/h5>\n<p>\u5408\u5e76\u8fde\u7eed\u7684\u7a7a\u767d\u5b57\u7b26&#xff08;\u591a\u4e2a\u7a7a\u683c\u3001\u5236\u8868\u7b26\u7b49\u4f1a\u5408\u5e76\u4e3a\u4e00\u4e2a&#xff09;&#xff0c;\u6587\u672c\u5728\u5fc5\u8981\u65f6\u81ea\u52a8\u6362\u884c\u4ee5\u9002\u5e94\u5bb9\u5668\u5bbd\u5ea6\u3002<\/p>\n<h5>2.\u00a0nowrap<\/h5>\n<p>\u5408\u5e76\u8fde\u7eed\u7684\u7a7a\u767d\u5b57\u7b26&#xff0c;\u6587\u672c\u4e0d\u4f1a\u6362\u884c&#xff0c;\u4f1a\u5728\u4e00\u884c\u5185\u663e\u793a&#xff0c;\u76f4\u5230\u9047\u5230\u00a0&lt;br&gt;\u00a0\u6807\u7b7e\u6216\u8005\u8d85\u51fa\u5bb9\u5668\u8fb9\u754c<\/p>\n<h5>3.\u00a0pre<\/h5>\n<p>\u4fdd\u7559\u8fde\u7eed\u7684\u7a7a\u767d\u5b57\u7b26&#xff0c;\u6587\u672c\u53ea\u6709\u5728\u9047\u5230\u00a0&lt;br&gt;\u00a0\u6807\u7b7e\u65f6\u624d\u4f1a\u6362\u884c&#xff0c;<span style=\"color:#fe2c24\">\u7c7b\u4f3c\u4e8e HTML \u4e2d\u7684\u00a0&lt;pre&gt;\u00a0\u6807\u7b7e\u3002<\/span><\/p>\n<h5>4.\u00a0pre-wrap<\/h5>\n<p>\u4fdd\u7559\u8fde\u7eed\u7684\u7a7a\u767d\u5b57\u7b26&#xff0c;\u6587\u672c\u5728\u5fc5\u8981\u65f6\u4f1a\u81ea\u52a8\u6362\u884c\u4ee5\u9002\u5e94\u5bb9\u5668\u5bbd\u5ea6&#xff0c;\u540c\u65f6\u4e5f\u4f1a\u4fdd\u7559\u6362\u884c\u7b26\u3002<\/p>\n<h5>\u00a05.\u00a0pre-line<\/h5>\n<p>\u5408\u5e76\u8fde\u7eed\u7684\u7a7a\u767d\u5b57\u7b26&#xff0c;\u4fdd\u7559\u6362\u884c\u7b26&#xff0c;\u6587\u672c\u5728\u5fc5\u8981\u65f6\u4f1a\u81ea\u52a8\u6362\u884c\u4ee5\u9002\u5e94\u5bb9\u5668\u5bbd\u5ea6\u3002<\/p>\n<hr \/>\n<h2 style=\"text-align:center\">\u76d2\u5b50\u6a21\u578b<\/h2>\n<hr \/>\n<p>\u6240\u6709\u7684HTML\u5143\u7d20\u90fd\u53ef\u4ee5\u770b\u4f5c\u662f\u76d2\u5b50\u3002\u5b83\u5305\u62ec&#xff1a;<\/p>\n<li>\u8fb9\u8ddd&#xff08;\u5916\u8fb9\u8ddd&#xff09;&#xff08;margin&#xff09;<\/li>\n<li>\u8fb9\u6846&#xff08;border&#xff09;<\/li>\n<li>\u586b\u5145&#xff08;\u5185\u8fb9\u8ddd&#xff09;&#xff08;padding&#xff09;<\/li>\n<li>\u5b9e\u9645\u5185\u5bb9&#xff08;content&#xff09;<\/li>\n<p>\u6bcf\u4e2a\u76d2\u5b50\u90fd\u6709\u81ea\u5df1\u7684\u5927\u5c0f\u548c\u4f4d\u7f6e&#xff0c;\u800c\u4e14\u8fd8\u4f1a\u5f71\u54cd\u5176\u4ed6\u76d2\u5b50\u7684\u5927\u5c0f\u548c\u4f4d\u7f6e\u3002<\/p>\n<h3>\u8fb9\u8ddd&#xff08;\u5916\u8fb9\u8ddd&#xff09;&#xff08;Margin&#xff09;<\/h3>\n<p>\u5373\u5143\u7d20\u4e0e\u5176\u4ed6\u5143\u7d20\u4e4b\u95f4\u7684\u8ddd\u79bb&#xff0c;\u7528\u4e8e\u63a7\u5236\u5143\u7d20\u5728\u9875\u9762\u4e2d\u7684\u4f4d\u7f6e\u3002<\/p>\n<p>\u5916\u8fb9\u8ddd\u53ef\u4ee5\u901a\u8fc7\u00a0margin-top\u3001margin-right\u3001margin-bottom\u00a0\u548c\u00a0margin-left\u00a0\u5c5e\u6027\u5206\u522b\u8bbe\u7f6e&#xff0c;\u4e5f\u53ef\u4ee5\u4f7f\u7528\u00a0margin\u00a0\u7b80\u5199\u5c5e\u6027\u3002<\/p>\n<p><span style=\"color:#fe2c24\">\u4f46\u662f\u5f53margin\u4f5c\u7528\u4e8e\u884c\u7ea7\u5143\u7d20\u65f6&#xff0c;top\u548cbottom\u57fa\u672c\u65e0\u6548&#xff0c;right\u548cleft\u4e0a\u6548\u679c\u2026\u2026<\/span><\/p>\n<p><span style=\"color:#1a439c\"><span style=\"background-color:#ffd900\">\u7b80\u5199<\/span><\/span>\u7684\u65f6\u5019\u6709\u5982\u4e0b\u51e0\u79cd<\/p>\n<p>margin(10px ,10px ,10px ,10px ) ;\u00a0\u00a0<\/p>\n<p>\u987a\u5e8f\u662f&#xff1a;\u4e0a&#xff0c;\u53f3&#xff0c;\u4e0b&#xff0c;\u5de6 \u3002<\/p>\n<p>margin(10px ,10px ) ;<\/p>\n<p>\u987a\u5e8f\u662f&#xff1a;\u4e0a\u4e0b&#xff0c;\u5de6\u53f3\u3002\u00a0<\/p>\n<h3>\u8fb9\u6846&#xff08;Border&#xff09;<\/h3>\n<p>\u56f4\u7ed5\u5728\u5185\u8fb9\u8ddd\u548c\u5185\u5bb9\u533a\u57df\u5468\u56f4\u7684\u7ebf\u6761\u3002<\/p>\n<h4>border<\/h4>\n<p>\u8fb9\u6846\u7684\u6837\u5f0f\u3001\u5bbd\u5ea6\u548c\u989c\u8272\u53ef\u4ee5\u901a\u8fc7\u00a0border-style\u3001border-width\u00a0\u548c\u00a0border-color\u00a0\u5c5e\u6027\u6765\u63a7\u5236&#xff0c;\u540c\u6837\u4e5f\u6709\u00a0border\u00a0\u7b80\u5199\u5c5e\u6027\u3002<\/p>\n<p>border:20px ,solid ,blue ;<\/p>\n<h4>border-style<\/h4>\n<p>\u00a0none&#xff1a;\u6ca1\u6709\u8fb9\u6846<\/p>\n<p>solid&#xff1a;\u5b9e\u7ebf\u8fb9\u6846<\/p>\n<p>dashed&#xff1a;\u865a\u7ebf\u8fb9\u6846<\/p>\n<p>dotted&#xff1a;\u70b9\u7ebf\u8fb9\u6846<\/p>\n<p>double&#xff1a;\u53cc\u5b9e\u7ebf\u8fb9\u6846<\/p>\n<h4>border-width<\/h4>\n<p>\u5728\u8bbe\u7f6e\u8fb9\u6846\u5bbd\u5ea6\u65f6&#xff0c;\u5fc5\u987b\u540c\u65f6\u8bbe\u7f6e\u8fb9\u6846\u6837\u5f0f&#xff0c;\u5982\u679c\u672a\u8bbe\u7f6e\u6837 \u5f0f\u6216\u8bbe\u7f6e\u4e3anone&#xff0c;\u5219\u4e0d\u8bba\u5bbd\u5ea6\u8bbe\u7f6e\u4e3a\u591a\u5c11\u90fd\u65e0\u6548\u3002<\/p>\n<p>\u540c\u6837\u6709\u7efc\u5408\u5c5e\u6027&#xff0c;\u53ef\u4ee5\u5206\u522b\u8bbe\u7f6e\u4e0a\u53f3\u4e0b\u5de6\u8fb9\u6846\u7684\u5bbd\u5ea6\u3002<\/p>\n<h4>border-color<\/h4>\n<p>\u8bbe\u7f6e\u8fb9\u6846\u989c\u8272&#xff0c;\u4e5f\u53ef\u4ee5\u5206\u522b\u8bbe\u7f6e\u4e0a\u53f3\u4e0b\u5de6\u7684\u8fb9\u6846\u989c\u8272\u3002<\/p>\n<h4><span style=\"color:#fe2c24\">\u00a0border-radius&#xff08;\u5706\u89d2\u8fb9\u6846&#xff09;<\/span><\/h4>\n<p>border-radius\u5c5e\u6027\u53ef\u4ee5\u5c06\u77e9\u5f62\u8fb9\u6846\u56db\u89d2\u5706\u89d2\u5316&#xff0c;\u5b9e\u73b0\u5706\u89d2\u6548\u679c<\/p>\n<p>div {<br \/>\n    border &#8211; radius: 10px;<br \/>\n} <\/p>\n<p>\u4e00\u4e2a\u503c\u65f6\u00a0&#xff0c;\u56db\u4e2a\u89d2\u90fd\u4f1a\u5e94\u7528\u76f8\u540c\u7684\u5706\u89d2\u534a\u5f84&#xff1b;<\/p>\n<p>\u4e24\u4e2a\u503c\u65f6&#xff0c;\u7b2c\u4e00\u4e2a\u503c\u7528\u4e8e\u8bbe\u7f6e\u5de6\u4e0a\u89d2\u548c\u53f3\u4e0b\u89d2&#xff0c;\u7b2c\u4e8c\u4e2a\u503c\u7528\u4e8e\u8bbe\u7f6e\u53f3\u4e0a\u89d2\u548c\u5de6\u4e0b\u89d2&#xff1b;<\/p>\n<p>\u4e09\u4e2a\u503c\u65f6&#xff0c;\u7b2c\u4e00\u4e2a\u503c\u7528\u4e8e\u5de6\u4e0a\u89d2&#xff0c;\u7b2c\u4e8c\u4e2a\u503c\u7528\u4e8e\u53f3\u4e0a\u89d2\u548c\u5de6\u4e0b\u89d2&#xff0c;\u7b2c\u4e09\u4e2a\u503c\u7528\u4e8e\u53f3\u4e0b\u89d2&#xff1b;<\/p>\n<p>\u56db\u4e2a\u503c\u65f6&#xff0c;\u5bf9\u5e94\u5de6\u4e0a\u89d2\u3001\u53f3\u4e0a\u89d2\u3001\u53f3\u4e0b\u89d2\u3001\u5de6\u4e0b\u89d2\u3002<\/p>\n<h5>\u659c\u6760&#xff08;\/&#xff09;\u5206\u9694\u503c<\/h5>\n<p>\u8fd8\u53ef\u4ee5\u4f7f\u7528\u659c\u6760\u6765\u5206\u522b\u6307\u5b9a\u6c34\u5e73\u548c\u5782\u76f4\u65b9\u5411\u7684\u5706\u89d2\u534a\u5f84\u3002<\/p>\n<p>div {<br \/>\n    border &#8211; radius: 20px \/ 40px;<br \/>\n} <\/p>\n<p>\u00a0\u6c34\u5e73\u65b9\u5411\u7684\u5706\u89d2\u534a\u5f84\u662f 20 \u50cf\u7d20&#xff0c;\u5782\u76f4\u65b9\u5411\u7684\u5706\u89d2\u534a\u5f84\u662f 40 \u50cf\u7d20\u3002<\/p>\n<p>\u4e5f\u53ef\u4ee5\u7528\u591a\u4e2a\u503c\u7ed3\u5408\u659c\u6760\u6765\u4e3a\u6bcf\u4e2a\u89d2\u5206\u522b\u6307\u5b9a\u4e0d\u540c\u7684\u6c34\u5e73\u548c\u5782\u76f4\u534a\u5f84\u3002<\/p>\n<p>div {<br \/>\n    border &#8211; radius: 10px 20px 30px 40px \/ 20px 30px 40px 50px;<br \/>\n} <\/p>\n<h4>border-images&#xff08;\u56fe\u7247\u8fb9\u6846&#xff09;<\/h4>\n<p>\u5b83\u7efc\u5408\u4e86\u00a0border-image-source\u3001border-image-slice\u3001border-image-width\u3001border-image-outset\u00a0\u548c\u00a0border-image-repeat\u00a0\u8fd9\u4e9b\u5c5e\u6027<\/p>\n<p>\u53d6\u503c\u683c\u5f0f\u4e3a&#xff1a;<\/p>\n<p>border-image: source slice width outset repeat;<\/p>\n<ul>\n<li><span style=\"background-color:null\">source<\/span><span style=\"background-color:null\">&#xff1a;\u6307\u5b9a\u7528\u4f5c\u8fb9\u6846\u7684\u56fe\u7247\u7684\u8def\u5f84&#xff0c;\u53ef\u4ee5\u662f\u76f8\u5bf9\u8def\u5f84\u6216\u7edd\u5bf9\u8def\u5f84&#xff0c;\u4e5f\u53ef\u4ee5\u662f\u00a0<\/span><span style=\"background-color:null\">none<\/span><span style=\"background-color:null\">\u00a0\u8868\u793a\u4e0d\u4f7f\u7528\u56fe\u7247\u8fb9\u6846\u3002<\/span><\/li>\n<li><span style=\"background-color:null\">slice<\/span><span style=\"background-color:null\">&#xff1a;\u5c06\u56fe\u7247\u5206\u5272\u6210\u4e5d\u4e2a\u533a\u57df&#xff08;\u56db\u4e2a\u89d2\u3001\u56db\u6761\u8fb9\u548c\u4e00\u4e2a\u4e2d\u95f4\u533a\u57df&#xff09;&#xff0c;\u53d6\u503c\u53ef\u4ee5\u662f\u6570\u5b57\u3001\u767e\u5206\u6bd4\u6216\u5173\u952e\u5b57\u00a0<\/span><span style=\"background-color:null\">fill<\/span><span style=\"background-color:null\">\u3002\u6570\u5b57\u548c\u767e\u5206\u6bd4\u8868\u793a\u4ece\u56fe\u7247\u8fb9\u7f18\u5411\u5185\u7684\u504f\u79fb\u91cf&#xff0c;<\/span><span style=\"background-color:null\">fill<\/span><span style=\"background-color:null\">\u00a0\u8868\u793a\u4fdd\u7559\u4e2d\u95f4\u533a\u57df\u3002<\/span><\/li>\n<li><span style=\"background-color:null\">width<\/span><span style=\"background-color:null\">&#xff1a;\u8bbe\u7f6e\u8fb9\u6846\u56fe\u7247\u7684\u5bbd\u5ea6&#xff0c;\u53d6\u503c\u53ef\u4ee5\u662f\u957f\u5ea6\u503c&#xff08;\u5982\u00a0<\/span><span style=\"background-color:null\">px<\/span><span style=\"background-color:null\">&#xff09;\u3001\u767e\u5206\u6bd4\u6216\u5173\u952e\u5b57\u00a0<\/span><span style=\"background-color:null\">auto<\/span><span style=\"background-color:null\">\u3002\u9ed8\u8ba4\u503c\u662f\u00a0<\/span><span style=\"background-color:null\">1<\/span><span style=\"background-color:null\">&#xff0c;\u8868\u793a\u4f7f\u7528\u8fb9\u6846\u7684\u5bbd\u5ea6\u3002<\/span><\/li>\n<li><span style=\"background-color:null\">outset<\/span><span style=\"background-color:null\">&#xff1a;\u6307\u5b9a\u8fb9\u6846\u56fe\u7247\u76f8\u5bf9\u4e8e\u8fb9\u6846\u76d2\u7684\u504f\u79fb\u91cf&#xff0c;\u53d6\u503c\u4e3a\u957f\u5ea6\u503c\u6216\u767e\u5206\u6bd4\u3002\u9ed8\u8ba4\u503c\u662f\u00a0<\/span><span style=\"background-color:null\">0<\/span><span style=\"background-color:null\">\u3002<\/span><\/li>\n<li><span style=\"background-color:null\">repeat<\/span><span style=\"background-color:null\">&#xff1a;\u5b9a\u4e49\u8fb9\u6846\u56fe\u7247\u7684\u91cd\u590d\u65b9\u5f0f&#xff0c;\u53d6\u503c\u53ef\u4ee5\u662f\u00a0<\/span><span style=\"background-color:null\">stretch<\/span><span style=\"background-color:null\">&#xff08;\u62c9\u4f38&#xff09;\u3001<\/span><span style=\"background-color:null\">repeat<\/span><span style=\"background-color:null\">&#xff08;\u91cd\u590d&#xff09;\u3001<\/span><span style=\"background-color:null\">round<\/span><span style=\"background-color:null\">&#xff08;\u73af\u7ed5&#xff09;\u6216\u00a0<\/span><span style=\"background-color:null\">space<\/span><span style=\"background-color:null\">&#xff08;\u95f4\u8ddd&#xff09;<\/span><\/li>\n<\/ul>\n<p>\u793a\u4f8b<\/p>\n<p>&lt;!DOCTYPE html&gt;<br \/>\n&lt;html lang&#061;&#034;en&#034;&gt;<\/p>\n<p>&lt;head&gt;<br \/>\n    &lt;meta charset&#061;&#034;UTF-8&#034;&gt;<br \/>\n    &lt;style&gt;<br \/>\n        .border-image-box {<br \/>\n            width: 200px;<br \/>\n            height: 100px;<br \/>\n            border: 20px solid;<br \/>\n            border-image: url(&#039;border.png&#039;) 30 round;<br \/>\n            padding: 20px;<br \/>\n            text-align: center;<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<br \/>\n    &lt;div class&#061;&#034;border-image-box&#034;&gt;<br \/>\n        \u8fd9\u662f\u4e00\u4e2a\u4f7f\u7528\u56fe\u7247\u8fb9\u6846\u7684\u76d2\u5b50<br \/>\n    &lt;\/div&gt;<br \/>\n&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt; <\/p>\n<ul>\n<li>url(&#039;border.png&#039;)&#xff1a;\u6307\u5b9a\u4e86\u7528\u4f5c\u8fb9\u6846\u7684\u56fe\u7247\u8def\u5f84\u3002<\/li>\n<li>30&#xff1a;\u8868\u793a\u5c06\u56fe\u7247\u4ece\u8fb9\u7f18\u5411\u5185\u5206\u5272 30 \u50cf\u7d20&#xff0c;\u4ee5\u6b64\u5212\u5206\u51fa\u4e5d\u4e2a\u533a\u57df\u3002<\/li>\n<li>round&#xff1a;\u8868\u793a\u8fb9\u6846\u56fe\u7247\u91c7\u7528\u73af\u7ed5\u7684\u65b9\u5f0f\u91cd\u590d\u3002<\/li>\n<\/ul>\n<h3>\u5185\u8fb9\u8ddd&#xff08;\u586b\u5145&#xff09;&#xff08;Padding&#xff09;&#xff1a;<\/h3>\n<p>\u5185\u5bb9\u533a\u57df\u4e0e\u8fb9\u6846\u4e4b\u95f4\u7684\u8ddd\u79bb&#xff0c;\u5728\u5185\u5bb9\u5468\u56f4\u521b\u5efa\u4e00\u4e9b\u7a7a\u767d\u7a7a\u95f4\u3002<\/p>\n<p>\u5185\u8fb9\u8ddd\u53ef\u4ee5\u901a\u8fc7\u00a0padding-top\u3001padding-right\u3001padding-bottom\u00a0\u548c\u00a0padding-left\u00a0\u5c5e\u6027\u5206\u522b\u8bbe\u7f6e&#xff0c;\u4e5f\u53ef\u4ee5\u4f7f\u7528\u00a0padding\u00a0\u7b80\u5199\u5c5e\u6027\u4e00\u6b21\u6027\u8bbe\u7f6e<\/p>\n<p><span style=\"color:#fe2c24\">\u5f53\u4f5c\u7528\u4e8e\u884c\u7ea7\u5143\u7d20\u65f6&#xff0c;\u4ec5\u4ec5\u4f1a\u663e\u793a&#xff0c;\u5bf9\u5176\u4ed6\u5143\u7d20\u65e0\u5f71\u54cd<\/span><\/p>\n<h3>\u5185\u5bb9\u533a\u57df&#xff08;Content&#xff09;<\/h3>\n<p>\u5143\u7d20\u5b9e\u9645\u5305\u542b\u7684\u5185\u5bb9&#xff0c;\u5982\u6587\u672c\u3001\u56fe\u7247\u7b49\u3002<\/p>\n<p>\u5185\u5bb9\u533a\u57df\u7684\u5927\u5c0f\u7531\u00a0width\u00a0\u548c\u00a0height\u00a0\u5c5e\u6027\u6765\u63a7\u5236&#xff08;\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff09;<\/p>\n<h3>\u80cc\u666f<\/h3>\n<h4>background-color<\/h4>\n<h4>background-image<\/h4>\n<p>\u5728CSS\u4e2d\u7528url\u6765\u8bbe\u7f6e\u5730\u5740<\/p>\n<p>background-image&#xff1a;url&#xff08;\u5730\u5740&#xff09;&#xff1b;<\/p>\n<p>\u53ef\u4ee5\u7528\u9017\u53f7\u5206\u9694\u591a\u4e2a\u00a0url()\u00a0\u503c&#xff0c;\u8bbe\u7f6e\u591a\u5f20\u80cc\u666f\u56fe\u7247&#xff0c;\u524d\u9762\u7684\u56fe\u7247\u4f1a\u8986\u76d6\u5728\u540e\u9762\u7684\u56fe\u7247\u4e4b\u4e0a\u3002<\/p>\n<p>.multiple-images {<br \/>\n    background-image: url(&#039;image1.jpg&#039;), url(&#039;image2.jpg&#039;);<br \/>\n} <\/p>\n<h4>background-repeat<\/h4>\n<p>\u7528\u4e8e\u8bbe\u7f6e\u56fe\u7247\u7684\u5e73\u94fa\u5c5e\u6027<\/p>\n<h5>repeat<\/h5>\n<p>\u542b\u4e49 \u6cbf\u6c34\u5e73\u548c\u7ad6\u76f4\u4e24\u4e2a\u65b9\u5411\u5e73\u94fa&#xff08;\u9ed8\u8ba4\u503c&#xff09;<\/p>\n<h5>no-repeat<\/h5>\n<p>\u4e0d\u5e73\u94fa&#xff08;\u56fe\u50cf\u4f4d\u4e8e\u5143\u7d20\u7684\u5de6\u4e0a\u89d2&#xff0c;\u53ea\u663e\u793a\u4e00\u6b21&#xff09;<\/p>\n<h5>repeat-x<\/h5>\n<p>\u53ea\u6cbf\u6c34\u5e73\u65b9\u5411\u5e73\u94fa<\/p>\n<h5>repeat-y<\/h5>\n<p>\u53ea\u6cbf\u7ad6\u76f4\u65b9\u5411\u5e73\u94fa<\/p>\n<h4>background-size<\/h4>\n<p>\u8bbe\u7f6e\u80cc\u666f\u56fe\u7247\u7684\u5c3a\u5bf8,\u53ef\u4ee5\u662f\u957f\u5ea6\u503c&#xff0c;\u767e\u5206\u6bd4&#xff0c;\u4e5f\u53ef\u4ee5\u662f\u4e0b\u9762\u5173\u952e\u5b57&#xff0c;<\/p>\n<p>cover&#xff08;\u7f29\u653e\u56fe\u7247\u4f7f\u5b83\u5b8c\u5168\u8986\u76d6\u80cc\u666f\u533a\u57df&#xff0c;\u53ef\u80fd\u90e8\u5206\u56fe\u7247\u4f1a\u8d85\u51fa\u5143\u7d20\u8303\u56f4&#xff09;<\/p>\n<p>contain&#xff08;\u7f29\u653e\u56fe\u7247\u4f7f\u5b83\u5b8c\u5168\u5305\u542b\u5728\u80cc\u666f\u533a\u57df\u5185&#xff09;\u3002<\/p>\n<h4>background-position<\/h4>\n<p>\u56fe\u50cf\u4f4d\u7f6e\u5c5e\u6027<\/p>\n<p>\u6307\u5b9a\u80cc\u666f\u56fe\u7247\u7684\u8d77\u59cb\u4f4d\u7f6e&#xff0c;\u53d6\u503c\u53ef\u4ee5\u662f\u957f\u5ea6\u503c\u3001\u767e\u5206\u6bd4\u6216\u5173\u952e\u5b57<\/p>\n<p>&#xff08;\u00a0top\u3001bottom\u3001left\u3001right\u3001center&#xff09;<\/p>\n<h4>background-attachment<\/h4>\n<p>\u56fe\u50cf\u56fa\u5b9a\u5c5e\u6027<\/p>\n<h5>scroll<\/h5>\n<p>\u56fe\u50cf\u968f\u9875\u9762\u5143\u7d20\u4e00\u8d77\u6eda\u52a8<\/p>\n<h5>fixed<\/h5>\n<p>\u56fe\u50cf\u56fa\u5b9a\u5728\u5c4f\u5e55\u4e0a&#xff0c;\u4e0d\u968f\u9875\u9762\u5143\u7d20\u7684\u6eda\u52a8\u800c\u6eda\u52a8<\/p>\n<h5>local<\/h5>\n<p>\u56fe\u50cf\u968f\u5143\u7d20\u5185\u5bb9\u6eda\u52a8<\/p>\n<h4>background-origin<\/h4>\n<p>background-origin\u00a0\u53ef\u4ee5\u63a7\u5236\u80cc\u666f\u56fe\u7247\u4ece\u5143\u7d20\u7684\u54ea\u4e2a\u533a\u57df\u5f00\u59cb\u7ed8\u5236\u3002\u5b83\u901a\u5e38\u4e0e\u00a0background-position\u00a0\u7b49\u5c5e\u6027\u914d\u5408\u4f7f\u7528\u3002<\/p>\n<p>\u6709\u5982\u4e0b\u4e09\u4e2a\u5c5e\u6027\u503c&#xff1a;<\/p>\n<h5>padding-box:<\/h5>\n<p>\u9ed8\u8ba4\u503c\u3002\u80cc\u666f\u56fe\u7247\u7684\u539f\u70b9\u4f4d\u4e8e\u5143\u7d20\u5185\u8fb9\u8ddd&#xff08;padding&#xff09;\u533a\u57df\u7684\u5de6\u4e0a\u89d2\u3002<\/p>\n<h5>border-box:<\/h5>\n<p>\u80cc\u666f\u56fe\u7247\u7684\u539f\u70b9\u4f4d\u4e8e\u5143\u7d20\u8fb9\u6846&#xff08;border&#xff09;\u533a\u57df\u7684\u5de6\u4e0a\u89d2\u3002<\/p>\n<h5>content-box:<\/h5>\n<p>\u80cc\u666f\u56fe\u7247\u7684\u539f\u70b9\u4f4d\u4e8e\u5143\u7d20\u5185\u5bb9&#xff08;content&#xff09;\u533a\u57df\u7684\u5de6\u4e0a\u89d2\u3002<\/p>\n<h4>background<\/h4>\n<p>\u7efc\u5408\u8bbe\u7f6e\u5c5e\u6027<\/p>\n<p>.element {<br \/>\n    background: url(&#039;bg.jpg&#039;) no-repeat center\/cover fixed;<br \/>\n} <\/p>\n<p>\u4e0a\u8ff0\u4ee3\u7801\u4e00\u6b21\u6027\u8bbe\u7f6e\u4e86\u80cc\u666f\u56fe\u7247\u3001\u91cd\u590d\u65b9\u5f0f\u3001\u4f4d\u7f6e\u3001\u5c3a\u5bf8\u548c\u9644\u7740\u65b9\u5f0f\u3002<\/p>\n<h4>opacity<\/h4>\n<p>\u5bf9\u56fe\u7247\u548c\u80cc\u666f\u8bbe\u7f6e\u900f\u660e\u5ea6<\/p>\n<p>\u5b83\u662f\u4e00\u4e2a\u4ecb\u4e8e0~1\u4e4b\u95f4\u7684\u6d6e\u70b9\u6570\u503c\u3002\u5176\u4e2d&#xff0c;0\u8868\u793a\u5b8c\u5168\u900f \u660e&#xff0c;1\u8868\u793a\u5b8c\u5168\u4e0d\u900f\u660e&#xff0c;\u800c0.5\u5219\u8868\u793a\u534a\u900f\u660e\u3002<\/p>\n<h4><span style=\"color:#fe2c24\">box-shadow<\/span><\/h4>\n<p>\u5bf9\u76d2\u5b50\u6dfb\u52a0\u9634\u5f71\u6548\u679c\u3002\u53ef\u4ee5\u6539\u53d8\u9634\u5f71\u7684\u6295\u5c04\u65b9\u5411\u4ee5\u53ca\u6dfb\u52a0\u591a\u91cd\u9634\u5f71\u6548\u679c<\/p>\n<p>box-shadow: h-shadow v-shadow blur spread color inset; <\/p>\n<ul>\n<li>h-shadow&#xff1a;\u5fc5\u9700&#xff0c;\u4ee3\u8868\u6c34\u5e73\u9634\u5f71\u7684\u4f4d\u7f6e\u3002\u6b63\u503c\u8868\u793a\u9634\u5f71\u5728\u5143\u7d20\u53f3\u4fa7&#xff0c;\u8d1f\u503c\u8868\u793a\u5728\u5de6\u4fa7\u3002<\/li>\n<li>v-shadow&#xff1a;\u5fc5\u9700&#xff0c;\u4ee3\u8868\u5782\u76f4\u9634\u5f71\u7684\u4f4d\u7f6e\u3002\u6b63\u503c\u8868\u793a\u9634\u5f71\u5728\u5143\u7d20\u4e0b\u65b9&#xff0c;\u8d1f\u503c\u8868\u793a\u5728\u4e0a\u65b9\u3002<\/li>\n<li>blur&#xff1a;\u53ef\u9009&#xff0c;\u5b9a\u4e49\u9634\u5f71\u7684\u6a21\u7cca\u534a\u5f84&#xff0c;\u503c\u8d8a\u5927\u9634\u5f71\u8d8a\u6a21\u7cca\u3002\u9ed8\u8ba4\u503c\u4e3a 0&#xff0c;\u5373\u65e0\u6a21\u7cca\u6548\u679c\u3002<\/li>\n<li>spread&#xff1a;\u53ef\u9009&#xff0c;\u89c4\u5b9a\u9634\u5f71\u7684\u6269\u5c55\u534a\u5f84\u3002\u6b63\u503c\u4f1a\u4f7f\u9634\u5f71\u6269\u5927&#xff0c;\u8d1f\u503c\u4f1a\u4f7f\u9634\u5f71\u7f29\u5c0f\u3002\u9ed8\u8ba4\u503c\u4e3a 0\u3002<\/li>\n<li>color&#xff1a;\u53ef\u9009&#xff0c;\u6307\u5b9a\u9634\u5f71\u7684\u989c\u8272\u3002\u53ef\u4ee5\u4f7f\u7528\u989c\u8272\u540d\u79f0\u3001\u5341\u516d\u8fdb\u5236\u503c\u3001RGB \u503c\u7b49\u3002\u9ed8\u8ba4\u503c\u7531\u6d4f\u89c8\u5668\u51b3\u5b9a\u3002<\/li>\n<li>inset&#xff1a;\u53ef\u9009&#xff0c;\u5173\u952e\u5b57\u3002\u82e5\u5b58\u5728&#xff0c;\u5219\u8868\u793a\u9634\u5f71\u4e3a\u5185\u9634\u5f71&#xff1b;\u82e5\u7701\u7565&#xff0c;\u5219\u4e3a\u5916\u9634\u5f71\u3002<\/li>\n<\/ul>\n<p>\u793a\u4f8b&#xff1a;<\/p>\n<p>.inset-shadow {<br \/>\n    width: 200px;<br \/>\n    height: 100px;<br \/>\n    background-color: lightgreen;<br \/>\n    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2);<br \/>\n} <\/p>\n<p>\u5982\u679c\u60f3\u8bbe\u7f6e\u591a\u91cd\u9634\u5f71<\/p>\n<p>.multiple-shadows {<br \/>\n    width: 200px;<br \/>\n    height: 100px;<br \/>\n    background-color: lightcoral;<br \/>\n    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3), -5px -5px 10px rgba(255, 255, 255, 0.8);<br \/>\n} <\/p>\n<p>\u6dfb\u52a0\u4e86\u4e24\u4e2a\u9634\u5f71&#xff0c;\u4e00\u4e2a\u662f\u53f3\u4e0b\u89d2\u7684\u9ed1\u8272\u9634\u5f71&#xff0c;\u53e6\u4e00\u4e2a\u662f\u5de6\u4e0a\u89d2\u7684\u767d\u8272\u9634\u5f71\u3002<\/p>\n<h4><span style=\"color:#fe2c24\">\u989c\u8272\u6e10\u53d8<\/span><\/h4>\n<h5>\u7ebf\u6027\u6e10\u53d8<\/h5>\n<p>\u5728\u7ebf\u6027\u6e10\u53d8\u8fc7\u7a0b\u4e2d&#xff0c;\u8d77\u59cb\u989c\u8272\u4f1a\u6cbf\u7740\u4e00\u6761\u76f4\u7ebf\u6309\u987a\u5e8f\u8fc7\u6e21\u5230\u7ed3\u675f\u989c\u8272<\/p>\n<p>background: linear-gradient(direction, color-stop1, color-stop2, &#8230;);<\/p>\n<ul>\n<li>direction&#xff1a;\u6307\u5b9a\u6e10\u53d8\u7684\u65b9\u5411&#xff0c;\u53ef\u4ee5\u662f\u89d2\u5ea6\u503c&#xff08;\u5982\u00a045deg&#xff09;\u3001\u5173\u952e\u5b57&#xff08;\u5982\u00a0to top\u3001to right\u3001to bottom right\u00a0\u7b49&#xff09;\u3002\u9ed8\u8ba4\u503c\u662f\u00a0to bottom&#xff0c;\u5373\u4ece\u4e0a\u5230\u4e0b\u6e10\u53d8\u3002<\/li>\n<li>color-stop&#xff1a;\u8868\u793a\u989c\u8272\u7684\u505c\u6b62\u70b9&#xff0c;\u7531\u989c\u8272\u503c\u548c\u53ef\u9009\u7684\u4f4d\u7f6e\u7ec4\u6210\u3002\u4f4d\u7f6e\u53ef\u4ee5\u662f\u767e\u5206\u6bd4&#xff08;\u5982\u00a050%&#xff09;\u6216\u957f\u5ea6\u503c&#xff08;\u5982\u00a050px&#xff09;&#xff0c;\u7528\u4e8e\u6307\u5b9a\u8be5\u989c\u8272\u5728\u6e10\u53d8\u4e2d\u5f00\u59cb\u6216\u7ed3\u675f\u7684\u4f4d\u7f6e<\/li>\n<\/ul>\n<p>\u793a\u4f8b\u4e00\u00a0<\/p>\n<p>.angled-gradient {<br \/>\n    background: linear-gradient(45deg, red, blue);<br \/>\n} <\/p>\n<p>\u6b64\u4ee3\u7801\u521b\u5efa\u4e86\u4e00\u4e2a 45 \u5ea6\u89d2\u7684\u6e10\u53d8&#xff0c;\u989c\u8272\u4ece\u7ea2\u8272\u8fc7\u6e21\u5230\u84dd\u8272\u3002<\/p>\n<p>\u793a\u4f8b\u4e8c<\/p>\n<p>.positioned-gradient {<br \/>\n    background: linear-gradient(to right, red 20%, yellow 50%, green 80%);<br \/>\n} <\/p>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d&#xff0c;\u7ea2\u8272\u4ece\u6e10\u53d8\u7684\u8d77\u59cb\u4f4d\u7f6e\u5f00\u59cb&#xff0c;\u5230 20% \u7684\u4f4d\u7f6e\u7ed3\u675f&#xff1b;\u9ec4\u8272\u4ece 20% \u7684\u4f4d\u7f6e\u5f00\u59cb&#xff0c;\u5230 50% \u7684\u4f4d\u7f6e\u7ed3\u675f&#xff1b;\u7eff\u8272\u4ece 50% \u7684\u4f4d\u7f6e\u5f00\u59cb&#xff0c;\u5230 80% \u7684\u4f4d\u7f6e\u7ed3\u675f\u3002<\/p>\n<h5>\u91cd\u590d\u7ebf\u6027\u6e10\u53d8<\/h5>\n<p>\u8981\u4ed4\u7ec6\u89c2\u5bdf<\/p>\n<p>.repeating-gradient {<br \/>\n    background: repeating-linear-gradient(45deg, red, red 10px, blue 10px, blue 20px);<br \/>\n} <\/p>\n<p>\u4e0a\u8ff0\u4ee3\u7801\u521b\u5efa\u4e86\u4e00\u4e2a 45 \u5ea6\u89d2\u7684\u91cd\u590d\u7ebf\u6027\u6e10\u53d8&#xff0c;\u7ea2\u8272\u548c\u84dd\u8272\u4ea4\u66ff\u51fa\u73b0&#xff0c;\u6bcf\u4e2a\u989c\u8272\u533a\u57df\u7684\u5bbd\u5ea6\u4e3a 10 \u50cf\u7d20\u3002<\/p>\n<h5>\u5f84\u5411\u6e10\u53d8<\/h5>\n<p>background: radial-gradient(shape size at position, start-color, &#8230;, last-color);<\/p>\n<ul>\n<li>shape&#xff1a;\u6307\u5b9a\u6e10\u53d8\u7684\u5f62\u72b6&#xff0c;\u53ef\u9009\u503c\u6709\u00a0circle&#xff08;\u5706\u5f62&#xff09;\u548c\u00a0ellipse&#xff08;\u692d\u5706\u5f62&#xff09;\u3002\u9ed8\u8ba4\u503c\u662f\u6839\u636e\u5143\u7d20\u7684\u5c3a\u5bf8\u81ea\u52a8\u786e\u5b9a&#xff0c;\u5982\u679c\u5143\u7d20\u662f\u6b63\u65b9\u5f62\u5219\u4e3a\u00a0circle&#xff0c;\u5426\u5219\u4e3a\u00a0ellipse\u3002<\/li>\n<li>size&#xff1a;\u5b9a\u4e49\u6e10\u53d8\u7684\u5927\u5c0f&#xff0c;\u6709\u591a\u79cd\u53d6\u503c\u65b9\u5f0f&#xff1a;\n<ul>\n<li>closest-side&#xff1a;\u6e10\u53d8\u7684\u8fb9\u7f18\u63a5\u89e6\u5230\u79bb\u4e2d\u5fc3\u70b9\u6700\u8fd1\u7684\u8fb9\u3002<\/li>\n<li>farthest-side&#xff1a;\u6e10\u53d8\u7684\u8fb9\u7f18\u63a5\u89e6\u5230\u79bb\u4e2d\u5fc3\u70b9\u6700\u8fdc\u7684\u8fb9\u3002<\/li>\n<li>closest-corner&#xff1a;\u6e10\u53d8\u7684\u8fb9\u7f18\u63a5\u89e6\u5230\u79bb\u4e2d\u5fc3\u70b9\u6700\u8fd1\u7684\u89d2\u3002<\/li>\n<li>farthest-corner&#xff1a;\u6e10\u53d8\u7684\u8fb9\u7f18\u63a5\u89e6\u5230\u79bb\u4e2d\u5fc3\u70b9\u6700\u8fdc\u7684\u89d2\u3002<\/li>\n<li>\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5177\u4f53\u7684\u957f\u5ea6\u503c&#xff08;\u5982\u00a0100px&#xff09;\u6216\u767e\u5206\u6bd4\u6765\u6307\u5b9a\u5927\u5c0f<\/li>\n<\/ul>\n<\/li>\n<li>position&#xff1a;\u6307\u5b9a\u6e10\u53d8\u7684\u4e2d\u5fc3\u70b9\u4f4d\u7f6e&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u5173\u952e\u5b57&#xff08;\u5982\u00a0center\u3001top\u3001bottom\u3001left\u3001right&#xff09;\u6216\u5177\u4f53\u7684\u957f\u5ea6\u503c\u3001\u767e\u5206\u6bd4\u6765\u8868\u793a\u3002\u9ed8\u8ba4\u503c\u662f\u00a0center<\/li>\n<\/ul>\n<p>\u793a\u4f8b\u4e00&#xff08;\u7b80\u5355\u5f84\u5411\u6e10\u53d8&#xff09;<\/p>\n<p>.simple-radial {<br \/>\n    background: radial-gradient(red, blue);<br \/>\n} <\/p>\n<p>\u793a\u4f8b\u4e8c&#xff08;\u6307\u5b9a\u5f62\u72b6&#xff09;<\/p>\n<p>.circle-radial {<br \/>\n    background: radial-gradient(circle, red, blue);<br \/>\n} <\/p>\n<p>\u793a\u4f8b\u4e09&#xff08;\u6307\u5b9a\u4e2d\u5fc3\u70b9\u4f4d\u7f6e&#xff09;<\/p>\n<p>.positioned-radial {<br \/>\n    background: radial-gradient(at top left, red, blue);<br \/>\n} <\/p>\n<p>\u793a\u4f8b\u56db&#xff08;\u6307\u5b9a\u6e10\u53d8\u5927\u5c0f&#xff09;<\/p>\n<p>.size-radial {<br \/>\n    background: radial-gradient(circle closest-side, red, blue);<br \/>\n} <\/p>\n<p>\u793a\u4f8b\u4e94&#xff08;\u591a\u989c\u8272&#xff09;<\/p>\n<p>.multi-color-radial {<br \/>\n    background: radial-gradient(red 10%, yellow 30%, green 60%);<br \/>\n} <\/p>\n<h5>\u91cd\u590d\u5f84\u5411\u6e10\u53d8<\/h5>\n<p>.repeating-radial {<br \/>\n    background: repeating-radial-gradient(circle, red, red 10px, blue 10px, blue 20px);<br \/>\n} <\/p>\n<p>\u7ea2\u8272\u548c\u84dd\u8272\u4ea4\u66ff\u51fa\u73b0&#xff0c;\u6bcf\u4e2a\u989c\u8272\u533a\u57df\u7684\u5bbd\u5ea6\u4e3a 10 \u50cf\u7d20\u3002<\/p>\n<h3 style=\"text-align:center\">\u8865\u5145<\/h3>\n<h4>1.\u8fd8\u6709\u4e00\u91cd\u8981\u4e2a\u5c5e\u6027&#xff1a;<\/h4>\n<p><span style=\"color:#4da8ee\">box-size&#xff1a;<\/span><\/p>\n<p>\u8bbe\u7f6e\u76d2\u5b50\u7684\u79cd\u7c7b<\/p>\n<p>\u6709<span style=\"color:#fe2c24\">content<\/span>-box&#xff08;\u9ed8\u8ba4&#xff09;&#xff1b;<span style=\"color:#fe2c24\">border<\/span>-box\u4e24\u79cd&#xff0c;\u533a\u522b\u662f\u5728\u5b9a\u4e49width\u548cheight\u65f6\u7684\u4e0d\u540c<\/p>\n<p>\u524d\u8005\u7684width\u548cheight\u90fd\u4e0d\u5305\u62ecpadding&#xff0c;border\u7b49&#xff0c;\u53ea\u662fcontent\u7684\u5927\u5c0f\u3002\u6709\u65f6\u5019\u4f1a\u53d1\u73b0\u76d2\u5b50\u201c<span style=\"color:#fe2c24\">\u81a8\u80c0<\/span>\u201d\u4e86<\/p>\n<p>\u540e\u8005\u7684\u5305\u542bpadding&#xff0c;border&#xff0c;\u5e76\u4e14\u6ce8\u610f\u4e24\u8005\u5747\u4e0d\u542bmargin\u3002<\/p>\n<h4>2.\u5916\u8fb9\u8ddd\u584c\u9677<\/h4>\n<ul>\n<li>\u5f53\u4e0a\u4e0b\u4e24\u4e2a\u5757\u5143\u7d20\u76f8\u9047\u65f6&#xff0c;\u5982\u679c\u4e0a\u9762\u5143\u7d20\u6709\u4e0b\u8fb9\u8ddd&#xff0c;\u4e0b\u9762\u5143\u7d20\u6709\u4e0a\u8fb9\u8ddd&#xff0c;\u90a3\u4e48\u603b\u8fb9\u8ddd\u65f6<span style=\"color:#fe2c24\">\u4e24\u8005\u7684\u6700\u5927\u8005<\/span>\u3002\u800c\u4e0d\u662f\u548c\u3002<\/li>\n<li>\u5bf9\u4e8e\u5d4c\u5957\u7684\u5757\u7ea7\u5143\u7d20&#xff0c;\u5982\u679c\u7236\u5143\u7d20\u6ca1\u6709\u8bbe\u7f6e<span style=\"color:#fe2c24\">\u5185\u8fb9\u8ddd\u53ca\u8fb9\u6846<\/span><span style=\"color:null\">&#xff0c;\u5219\u7236\u5143\u7d20\u7684<\/span><span style=\"color:#fe2c24\">\u4e0a\u5916\u8fb9\u8ddd<\/span><span style=\"color:null\">\u4e0e\u5b50\u5143\u7d20\u7684<\/span><span style=\"color:#fe2c24\">\u4e0a\u5916\u8fb9\u8ddd<\/span><span style=\"color:null\">\u4f1a\u53d1\u751f\u5408\u5e76&#xff0c;\u5408\u5e76\u4e3a\u4e24\u8005\u8f83\u5927\u8005<\/span><\/li>\n<\/ul>\n<h4 style=\"background-color:transparent\">3.auto<span style=\"color:#fe2c24\">\u5c45\u4e2d<\/span><\/h4>\n<p>\u5f53\u5bf9\u5757\u7ea7\u5143\u7d20\u5e94\u7528\u5bbd\u5ea6\u5c5e\u6027width&#xff0c;\u5e76\u5c06\u5de6\u53f3\u7684\u5916\u8fb9\u8ddd&#xff08;margin&#xff09;\u90fd\u8bbe\u7f6e\u4e3aauto&#xff0c;\u53ef\u4f7f\u5757\u7ea7\u5143\u7d20\u6c34\u5e73\u5c45\u4e2d&#xff0c;\u5b9e\u9645\u5de5\u4f5c\u4e2d\u5e38\u7528\u8fd9\u79cd\u65b9\u5f0f\u8fdb\u884c\u7f51\u9875\u5e03\u5c40\u3002<\/p>\n<h4>4.\u5143\u7d20\u7684\u7c7b\u578b\u548c\u8f6c\u6362<\/h4>\n<h5>\u5143\u7d20\u7c7b\u578b<\/h5>\n<h5>\u5757\u7ea7\u5143\u7d20<\/h5>\n<ul>\n<li>\u72ec\u5360\u4e00\u884c&#xff0c;\u65e0\u8bba\u5185\u5bb9\u591a\u5c11&#xff0c;\u90fd\u4f1a\u5728\u9875\u9762\u4e2d\u53e6\u8d77\u4e00\u884c\u663e\u793a\u3002<\/li>\n<li>\u53ef\u4ee5\u8bbe\u7f6e\u5bbd\u5ea6\u548c\u9ad8\u5ea6&#xff0c;\u9ed8\u8ba4\u5bbd\u5ea6\u662f\u5176\u7236\u5143\u7d20\u5bbd\u5ea6\u7684 100%\u3002<\/li>\n<li>\u53ef\u4ee5\u8bbe\u7f6e\u4e0a\u4e0b\u5de6\u53f3\u7684\u5185\u8fb9\u8ddd&#xff08;padding&#xff09;\u548c\u5916\u8fb9\u8ddd&#xff08;margin&#xff09;<\/li>\n<\/ul>\n<p>\u884c\u5185\u5143\u7d20<\/p>\n<ul>\n<li>\u4e0d\u4f1a\u72ec\u5360\u4e00\u884c&#xff0c;\u591a\u4e2a\u884c\u5185\u5143\u7d20\u53ef\u4ee5\u5728\u540c\u4e00\u884c\u663e\u793a\u3002<\/li>\n<li>\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u7531\u5185\u5bb9\u51b3\u5b9a&#xff0c;\u4e0d\u80fd\u76f4\u63a5\u8bbe\u7f6e\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u3002<\/li>\n<li>\u6c34\u5e73\u65b9\u5411\u7684\u5185\u8fb9\u8ddd\u548c\u5916\u8fb9\u8ddd\u53ef\u4ee5\u8bbe\u7f6e&#xff0c;\u4f46\u5782\u76f4\u65b9\u5411\u7684\u5185\u8fb9\u8ddd\u548c\u5916\u8fb9\u8ddd\u8bbe\u7f6e\u53ef\u80fd\u65e0\u6548<\/li>\n<\/ul>\n<h5>\u00a0\u884c\u5185\u5757\u7ea7\u5143\u7d20<\/h5>\n<ul>\n<li>\u4e0d\u4f1a\u72ec\u5360\u4e00\u884c&#xff0c;\u591a\u4e2a\u884c\u5185\u5757\u7ea7\u5143\u7d20\u53ef\u4ee5\u5728\u540c\u4e00\u884c\u663e\u793a\u3002<\/li>\n<li>\u53ef\u4ee5\u8bbe\u7f6e\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u3002<\/li>\n<li>\u53ef\u4ee5\u8bbe\u7f6e\u4e0a\u4e0b\u5de6\u53f3\u7684\u5185\u8fb9\u8ddd\u548c\u5916\u8fb9\u8ddd\u3002<\/li>\n<\/ul>\n<h5>\u7c7b\u578b\u8f6c\u6362<\/h5>\n<p>\u5143\u7d20\u7684\u00a0display\u00a0\u5c5e\u6027\u8bbe\u7f6e\u4e3a\u00a0block&#xff0c;\u5c31\u53ef\u4ee5\u5c06\u5176\u8f6c\u6362\u4e3a\u5757\u7ea7\u5143\u7d20\u3002<\/p>\n<p>\u4f8b\u5982&#xff1a;&lt;span&gt;\u00a0\u539f\u672c\u662f\u884c\u5185\u5143\u7d20&#xff0c;\u901a\u8fc7\u8bbe\u7f6e\u00a0display: block\u00a0\u8f6c\u6362\u4e3a\u5757\u7ea7\u5143\u7d20&#xff0c;\u80fd\u591f\u8bbe\u7f6e\u5bbd\u5ea6\u3001\u9ad8\u5ea6\u548c\u5916\u8fb9\u8ddd\u3002<\/p>\n<p>\u5143\u7d20\u7684\u00a0display\u00a0\u5c5e\u6027\u8bbe\u7f6e\u4e3a\u00a0inline&#xff0c;\u53ef\u4ee5\u5c06\u5176\u8f6c\u6362\u4e3a\u884c\u5185\u5143\u7d20\u3002<\/p>\n<p>\u4f8b\u5982&#xff1a;&lt;div&gt;\u00a0\u539f\u672c\u662f\u5757\u7ea7\u5143\u7d20&#xff0c;\u8bbe\u7f6e\u00a0display: inline\u00a0\u540e\u8f6c\u6362\u4e3a\u884c\u5185\u5143\u7d20&#xff0c;\u4f1a\u548c\u5176\u4ed6\u884c\u5185\u5143\u7d20\u5728\u540c\u4e00\u884c\u663e\u793a\u3002<\/p>\n<p>\u5143\u7d20\u7684\u00a0display\u00a0\u5c5e\u6027\u8bbe\u7f6e\u4e3a\u00a0inline-block&#xff0c;\u53ef\u4ee5\u5c06\u5176\u8f6c\u6362\u4e3a\u884c\u5185\u5757\u7ea7\u5143\u7d20\u3002<\/p>\n<p>\u4f8b\u5982&#xff1a;&lt;div&gt;\u00a0\u539f\u672c\u662f\u5757\u7ea7\u5143\u7d20&#xff0c;\u8bbe\u7f6e\u00a0display: inline-block\u00a0\u540e&#xff0c;\u4e24\u4e2a\u00a0&lt;div&gt;\u00a0\u5143\u7d20\u4f1a\u5728\u540c\u4e00\u884c\u663e\u793a&#xff0c;\u5e76\u4e14\u53ef\u4ee5\u8bbe\u7f6e\u5bbd\u5ea6\u3001\u9ad8\u5ea6\u548c\u5916\u8fb9\u8ddd\u3002<\/p>\n<h4>4.\u5143\u7d20\u7684\u9690\u85cf<\/h4>\n<p>display: none\u00a0\u4f1a\u8ba9\u5143\u7d20\u5728\u9875\u9762\u4e2d\u5b8c\u5168\u4e0d\u663e\u793a&#xff0c;\u5e76\u4e14\u8be5\u5143\u7d20\u4e0d\u4f1a\u5728\u6587\u6863\u6d41\u4e2d\u5360\u636e\u4efb\u4f55\u7a7a\u95f4\u3002\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u6d4f\u89c8\u5668\u5728\u6e32\u67d3\u9875\u9762\u65f6\u4f1a\u76f4\u63a5\u5ffd\u7565\u8bbe\u7f6e\u4e86\u00a0display: none\u00a0\u7684\u5143\u7d20&#xff0c;\u5c31\u597d\u50cf\u8fd9\u4e2a\u5143\u7d20\u5728 HTML \u4ee3\u7801\u91cc\u4e0d\u5b58\u5728\u4e00\u6837\u3002<\/p>\n<p><span style=\"color:#4da8ee\">\u7528\u4e8e\u52a8\u6001\u663e\u793a\u4e0e\u9690\u85cf\u5185\u5bb9&#xff0c;\u54cd\u5e94\u5f0f\u8bbe\u8ba1\u3002<\/span><\/p>\n<hr \/>\n<h2 style=\"text-align:center\"><span style=\"color:null\">\u5217\u8868<\/span><\/h2>\n<hr \/>\n<h3><span style=\"color:null\">list-style-type<\/span><\/h3>\n<p>\u63a7\u5236\u65e0\u5e8f\u548c\u6709 \u5e8f\u5217\u8868\u7684\u9879\u76ee\u7b26\u53f7<\/p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td style=\"width:144px\">\u5217\u8868\u7c7b\u578b<\/td>\n<td style=\"width:144px\">\u5c5e\u6027\u503c<\/td>\n<td style=\"width:211px\">\u663e\u793a\u6548\u679c<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"3\" style=\"width:144px\">\u65e0\u5e8f\u5217\u8868&#xff08;ul&#xff09;<\/td>\n<td style=\"width:144px\">disc<\/td>\n<td style=\"width:211px\">\u25cf<\/td>\n<\/tr>\n<tr>\n<td style=\"width:144px\">circle<\/td>\n<td style=\"width:211px\">\u25cb<\/td>\n<\/tr>\n<tr>\n<td style=\"width:144px\">squarre<\/td>\n<td style=\"width:211px\">\u25a0<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"5\" style=\"width:144px\">\u6709\u5e8f\u5217\u8868&#xff08;ol&#xff09;<\/td>\n<td style=\"width:144px\">decimal<\/td>\n<td style=\"width:211px\">\u963f\u62c9\u4f2f\u6570\u5b571\u30012\u30013&#8230;&#8230;<\/td>\n<\/tr>\n<tr>\n<td style=\"width:144px\">upper-alpha<\/td>\n<td style=\"width:211px\">\u5927\u5199\u82f1\u6587\u5b57\u6bcdA\u3001B\u3001C&#8230;&#8230;<\/td>\n<\/tr>\n<tr>\n<td style=\"width:144px\">lower-alpha<\/td>\n<td style=\"width:211px\">\u5c0f\u5199\u82f1\u6587\u5b57\u6bcda\u3001b\u3001c&#8230;&#8230;<\/td>\n<\/tr>\n<tr>\n<td style=\"width:144px\">upper-roman<\/td>\n<td style=\"width:211px\">\u5927\u5199\u7f57\u9a6c\u6570\u5b57I\u3001II\u3001III&#8230;&#8230;<\/td>\n<\/tr>\n<tr>\n<td style=\"width:144px\">lower-roman<\/td>\n<td style=\"width:211px\">\u5c0f\u5199\u7f57\u9a6c\u6570\u5b57i\u3001ii\u3001iii&#8230;&#8230;<\/td>\n<\/tr>\n<tr>\n<td style=\"width:144px\">(ol)(ul)\u516c\u5171\u5c5e\u6027<\/td>\n<td style=\"width:144px\">none<\/td>\n<td style=\"width:211px\">\u4e0d\u663e\u793a\u4efb\u4f55\u7b26\u53f7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:null\">\u4e00\u822c\u7528\u4e8e\u5f53list-style-image\u65e0\u6cd5\u6b63\u5e38\u663e\u793a\u65f6\u7684\u66ff\u4ee3\u3002<\/span><\/p>\n<h3>list-style-image<\/h3>\n<p>\u4e3a\u5404\u4e2a\u5217\u8868\u9879\u8bbe\u7f6e\u9879\u76ee\u56fe\u50cf<\/p>\n<p>list-style-image: url(image-url);<\/p>\n<h3>list-style-position<\/h3>\n<p>\u63a7\u5236\u5217\u8868\u9879\u76ee\u7b26\u53f7\u7684\u4f4d\u7f6e<\/p>\n<p>\u6307\u5b9a\u5217\u8868\u6807\u8bb0\u7684\u4f4d\u7f6e&#xff0c;\u53ef\u9009\u503c\u6709\u00a0inside&#xff08;\u5217\u8868\u6807\u8bb0\u5728\u5217\u8868\u9879\u5185\u5bb9\u5185\u90e8&#xff09;\u548c\u00a0outside&#xff08;\u5217\u8868\u6807\u8bb0\u5728\u5217\u8868\u9879\u5185\u5bb9\u5916\u90e8&#xff0c;\u9ed8\u8ba4\u503c&#xff09;\u3002<\/p>\n<p>list-style&#xff08;\u7b80\u5199\u5c5e\u6027&#xff09;<\/p>\n<p>ul {<br \/>\n    list-style: url(&#039;custom-marker.png&#039;) square outside;<br \/>\n} <\/p>\n<p>\u4e0a\u8ff0\u4ee3\u7801\u4e2d&#xff0c;list-style\u00a0\u4f9d\u6b21\u8bbe\u7f6e\u4e86\u00a0list-style-image\u3001list-style-type\u00a0\u548c\u00a0list-style-position\u3002<\/p>\n<hr \/>\n<h2 style=\"text-align:center\">\u9875\u9762\u5e03\u5c40<\/h2>\n<hr \/>\n<p>\u6700\u7b80\u5355\u7684\u9875\u9762\u5e03\u5c40&#xff0c;\u00a0\u7531\u5934\u90e8&#xff08;header&#xff09;\u3001\u5bfc\u822a&#xff08;nav&#xff09;\u3001\u7126\u70b9\u56fe&#xff08;banner&#xff09;\u3001\u5185\u5bb9&#xff08;content&#xff09;\u3001\u9875\u9762\u5e95\u90e8&#xff08;footer&#xff09;\u4e94\u90e8\u5206\u7ec4\u6210\u3002<\/p>\n<h3 style=\"text-align:center\">\u6d6e\u52a8<\/h3>\n<h4>\u8bbe\u7f6e\u6d6e\u52a8&#xff08;float&#xff09;<\/h4>\n<p>\u8bbe\u7f6e\u4e86\u6d6e\u52a8\u5c5e\u6027\u7684\u5143\u7d20\u4f1a\u8131\u79bb\u6807\u51c6\u6587\u6863\u6d41\u7684\u63a7\u5236&#xff0c;\u79fb\u52a8\u5230\u5176\u7236\u5143\u7d20\u4e2d\u6307\u5b9a\u4f4d\u7f6e\u7684\u8fc7\u7a0b\u3002<\/p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td>left<\/td>\n<td>\u5411\u5de6\u6d6e\u52a8<\/td>\n<\/tr>\n<tr>\n<td>right<\/td>\n<td>\u5411\u53f3\u6d6e\u52a8<\/td>\n<\/tr>\n<tr>\n<td>none<\/td>\n<td>\u4e0d\u6d6e\u52a8&#xff08;\u9ed8\u8ba4&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>1.<\/h5>\n<p>\u5f53\u628a\u6846 1 \u5411\u53f3\u6d6e\u52a8\u65f6&#xff0c;\u5b83\u8131\u79bb\u6587\u6863\u6d41\u5e76\u4e14\u5411\u53f3\u79fb\u52a8&#xff0c;\u76f4\u5230\u5b83 \u7684\u53f3\u8fb9\u7f18\u78b0\u5230\u5305\u542b\u6846\u7684\u53f3\u8fb9\u7f18<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"283\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091519-6819d327b17d5.png\" width=\"642\" \/><\/p>\n<h5>2.\u00a0<\/h5>\n<p>\u5f53\u6846 1 \u5411\u5de6\u6d6e\u52a8\u65f6&#xff0c;\u5b83\u8131\u79bb\u6587\u6863\u6d41\u5e76\u4e14\u5411\u5de6\u79fb\u52a8&#xff0c;\u76f4\u5230\u5b83 \u7684\u5de6\u8fb9\u7f18\u78b0\u5230\u5305\u542b\u6846\u7684\u5de6\u8fb9\u7f18\u3002\u56e0\u4e3a\u5b83\u4e0d\u518d\u5904\u4e8e\u6587\u6863\u6d41\u4e2d&#xff0c;\u6240\u4ee5\u5b83\u4e0d\u5360 \u636e\u7a7a\u95f4&#xff0c;\u5b9e\u9645\u4e0a\u8986\u76d6\u4f4f\u4e86\u6846 2&#xff0c;\u4f7f\u6846 2 \u4ece\u89c6\u56fe\u4e2d\u6d88\u5931\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"285\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091519-6819d327c0b7d.png\" width=\"307\" \/><\/p>\n<h5>3.\u00a0<\/h5>\n<p>\u5982\u679c\u628a\u6240\u6709\u4e09\u4e2a\u6846\u90fd\u5411\u5de6\u6d6e\u52a8&#xff0c;\u90a3\u4e48\u6846 1 \u5411\u5de6\u6d6e\u52a8\u76f4\u5230\u78b0\u5230 \u5305\u542b\u6846&#xff0c;\u53e6\u5916\u4e24\u4e2a\u6846\u5411\u5de6\u6d6e\u52a8\u76f4\u5230\u78b0\u5230\u524d\u4e00\u4e2a\u6d6e\u52a8\u6846\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"270\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091519-6819d327d12b2.png\" width=\"270\" \/><\/p>\n<h5>4.\u00a0<\/h5>\n<p>\u679c\u5305\u542b\u6846\u592a\u7a84&#xff0c;\u65e0\u6cd5\u5bb9\u7eb3\u6c34\u5e73\u6392\u5217\u7684\u4e09\u4e2a\u6d6e\u52a8\u5143 \u7d20&#xff0c;\u90a3\u4e48\u5176\u5b83\u6d6e\u52a8\u5757\u5411\u4e0b\u79fb\u52a8&#xff0c;\u76f4\u5230\u6709\u8db3\u591f\u7684\u7a7a\u95f4\u3002 \u5982\u679c\u6d6e\u52a8\u5143\u7d20\u7684\u9ad8\u5ea6\u4e0d\u540c&#xff0c;\u90a3\u4e48\u5f53\u5b83\u4eec\u5411\u4e0b\u79fb\u52a8\u65f6\u53ef\u80fd\u88ab\u5176\u5b83\u6d6e \u52a8\u5143\u7d20\u201c\u5361\u4f4f\u201d<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"261\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091519-6819d327db817.png\" width=\"552\" \/><\/p>\n<h5>5.<\/h5>\n<p>float\u4f1a\u5c06\u5143\u7d20\u4ece\u6587\u6863\u6d41\u4e2d\u5220\u9664&#xff0c;\u6240\u6709\u7684\u5757\u5143\u7d20\u5c06\u5ffd\u7565\u5b83&#xff0c;\u800c\u6240\u6709\u5185\u8054\u5143\u7d20&#xff08;\u4e5f\u5c31\u662f\u884c\u5185\u5143\u7d20&#xff09;\u77e5\u9053\u5b83\u7684\u5b58\u5728&#xff0c;\u4f1a\u4e3a\u5176\u8ba9\u51fa\u7a7a\u95f4&#xff0c;\u5f62\u6210\u73af\u7ed5\u6548\u679c\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"333\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091519-6819d327ec187.png\" width=\"722\" \/><\/p>\n<h4>\u6e05\u9664\u6d6e\u52a8&#xff08;clear&#xff09;<\/h4>\n<p>\u7531\u4e8e\u6d6e\u52a8\u5143\u7d20\u4e0d\u518d\u5360\u7528\u539f\u6587\u6863\u6d41\u4e2d\u7684\u4f4d\u7f6e&#xff0c;\u6240 \u4ee5\u4f1a\u5bf9\u9875\u9762\u4e2d\u5176\u4ed6\u5143\u7d20\u7684\u6392\u7248\u4ea7\u751f\u5f71\u54cd&#xff0c;\u5982\u679c \u8981\u907f\u514d\u8fd9\u79cd\u5f71\u54cd&#xff0c;\u5c31\u9700\u8981\u5bf9\u5143\u7d20\u6e05\u9664\u6d6e\u52a8<\/p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td>left<\/td>\n<td>\u6e05\u9664\u5de6\u6d6e\u52a8<\/td>\n<\/tr>\n<tr>\n<td>right<\/td>\n<td>\u6e05\u9664\u53f3\u6d6e\u52a8<\/td>\n<\/tr>\n<tr>\n<td>both<\/td>\n<td>\u6e05\u9664\u4e24\u4fa7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u00a0\u7279\u6b8a\u7684\u6e05\u9664\u6d6e\u52a8<\/h4>\n<p>\u8fd0\u7528clear\u5c5e\u6027\u53ea\u80fd\u6e05\u9664\u5143\u7d20\u5de6\u53f3\u4e24\u4fa7\u6d6e\u52a8\u7684\u5f71\u54cd\u3002\u7136\u800c\u5728\u5236\u4f5c\u7f51 \u9875\u65f6&#xff0c;\u7ecf\u5e38\u4f1a\u9047\u5230\u4e00\u4e9b\u7279\u6b8a\u7684\u6d6e\u52a8\u5f71\u54cd\u3002<\/p>\n<p>\u4f8b\u5982&#xff1a;\u5982\u679c\u6ca1\u6709\u7ed9\u5916\u5c42\u5b9a\u4e49\u9ad8\u5ea6&#xff0c;\u5c31\u4f1a\u9020\u6210\u584c\u9677&#xff0c;\u6709\u6ca1\u6709\u529e\u6cd5\u4f7f\u7528\u5e38\u89c4\u6e05\u9664\u6d6e\u52a8<\/p>\n<h5>1.\u4f7f\u7528overflow\u5c5e\u6027<\/h5>\n<p>overflow\u00a0\u5c5e\u6027\u53ef\u4ee5\u89e6\u53d1 BFC&#xff08;\u5757\u7ea7\u683c\u5f0f\u5316\u4e0a\u4e0b\u6587&#xff09;&#xff0c;\u4f7f\u7236\u5143\u7d20\u5305\u542b\u6d6e\u52a8\u5143\u7d20\u3002<\/p>\n<p>&lt;!DOCTYPE html&gt;<br \/>\n&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;style&gt;<br \/>\n        .parent {<br \/>\n            \/* \u89e6\u53d1 BFC *\/<br \/>\n            overflow: auto;<br \/>\n            background-color: lightblue;<br \/>\n        }<br \/>\n        .child {<br \/>\n            float: left;<br \/>\n            width: 100px;<br \/>\n            height: 100px;<br \/>\n            background-color: lightcoral;<br \/>\n            margin: 10px;<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;div class&#061;&#034;parent&#034;&gt;<br \/>\n        &lt;div class&#061;&#034;child&#034;&gt;&lt;\/div&gt;<br \/>\n        &lt;div class&#061;&#034;child&#034;&gt;&lt;\/div&gt;<br \/>\n    &lt;\/div&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt; <\/p>\n<p>\u4e0a\u8ff0\u4ee3\u7801&#xff0c;\u4e3a\u7236\u5143\u7d20\u00a0.parent\u00a0\u8bbe\u7f6e\u00a0overflow: auto&#xff0c;\u8fd9\u6837\u7236\u5143\u7d20\u5c31\u80fd\u5305\u542b\u6d6e\u52a8\u7684\u5b50\u5143\u7d20&#xff0c;\u907f\u514d\u9ad8\u5ea6\u584c\u9677\u3002<\/p>\n<p>\u00a0overflow\u5c5e\u6027\u53ef\u4ee5\u89e3\u51b3\u6ea2\u51fa\u95ee\u9898&#xff0c;<\/p>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td>visible<\/td>\n<td>\u5185\u5bb9\u4e0d\u4f1a\u88ab\u4fee\u526a&#xff0c;\u4f1a\u5448\u73b0\u5728\u5143\u7d20\u6846\u4e4b\u5916&#xff08;\u9ed8\u8ba4\u503c&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>hidden<\/td>\n<td>\u6ea2\u51fa\u5185\u5bb9\u4f1a\u88ab\u4fee\u526a&#xff0c;\u5e76\u4e14\u88ab\u4fee\u526a\u7684\u5185\u5bb9\u662f\u4e0d\u53ef\u89c1\u7684<\/td>\n<\/tr>\n<tr>\n<td>auto<\/td>\n<td>\u5728\u9700\u8981\u65f6\u4ea7\u751f\u6eda\u52a8\u6761&#xff0c;\u5373\u81ea\u9002\u5e94\u6240\u8981\u663e\u793a\u7684\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>scroll<\/td>\n<td>\u6ea2\u51fa\u5185\u5bb9\u4f1a\u88ab\u4fee\u526a&#xff0c;\u4e14\u6d4f\u89c8\u5668\u4f1a\u59cb\u7ec8\u663e\u793a\u6eda\u52a8\u6761<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>2.\u4f7f\u7528\u7a7a\u6807\u7b7e<\/h5>\n<p>\u7a7a\u6807\u7b7e\u662f\u4e00\u79cd\u4f20\u7edf\u4e14\u6709\u6548\u7684\u65b9\u6cd5\u3002\u5728\u6d6e\u52a8\u5143\u7d20\u7684\u672b\u5c3e\u6dfb\u52a0\u4e00\u4e2a\u7a7a\u7684 HTML \u6807\u7b7e&#xff0c;\u7136\u540e\u4e3a\u8fd9\u4e2a\u7a7a\u6807\u7b7e\u8bbe\u7f6e\u00a0clear: both\u00a0\u5c5e\u6027&#xff0c;\u4ee5\u6b64\u6765\u6e05\u9664\u6d6e\u52a8\u5e26\u6765\u7684\u5f71\u54cd&#xff0c;\u8ba9\u7236\u5143\u7d20\u80fd\u591f\u6b63\u786e\u5305\u88f9\u6d6e\u52a8\u7684\u5b50\u5143\u7d20\u3002<\/p>\n<p>&lt;!DOCTYPE html&gt;<br \/>\n&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;style&gt;<br \/>\n        .parent {<br \/>\n            background-color: lightblue;<br \/>\n        }<br \/>\n        .child {<br \/>\n            float: left;<br \/>\n            width: 100px;<br \/>\n            height: 100px;<br \/>\n            background-color: lightcoral;<br \/>\n            margin: 10px;<br \/>\n        }<br \/>\n        .clear {<br \/>\n            clear: both;<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;div class&#061;&#034;parent&#034;&gt;<br \/>\n        &lt;div class&#061;&#034;child&#034;&gt;&lt;\/div&gt;<br \/>\n        &lt;div class&#061;&#034;child&#034;&gt;&lt;\/div&gt;<br \/>\n        &lt;!&#8211; \u6dfb\u52a0\u7a7a\u7684 div \u6807\u7b7e\u7528\u4e8e\u6e05\u9664\u6d6e\u52a8 &#8211;&gt;<br \/>\n        &lt;div class&#061;&#034;clear&#034;&gt;&lt;\/div&gt;<br \/>\n    &lt;\/div&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;     <\/p>\n<h5>3.after\u4f2a\u5bf9\u8c61\u00a0<\/h5>\n<p>\u522b\u5fd8\u4e86after&#xff0c;before\u7684\u4f5c\u7528&#xff0c;\u5728\u5185\u5bb9\u540e&#xff0c;\u524d\u6dfb\u52a0\u4e00\u4e9b\u4e1c\u897f\u3002<\/p>\n<p>&lt;!DOCTYPE html&gt;<br \/>\n&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;style&gt;<br \/>\n        .parent {<br \/>\n            background-color: lightblue;<br \/>\n        }<br \/>\n        .parent::after {<br \/>\n            content: &#034;&#034;;<br \/>\n            display: block;<br \/>\n            clear: both;<br \/>\n            height: 0;<br \/>\n            visibility: hidden;<br \/>\n        }<br \/>\n        .child {<br \/>\n            float: left;<br \/>\n            width: 100px;<br \/>\n            height: 100px;<br \/>\n            background-color: lightcoral;<br \/>\n            margin: 10px;<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;div class&#061;&#034;parent&#034;&gt;<br \/>\n        &lt;div class&#061;&#034;child&#034;&gt;&lt;\/div&gt;<br \/>\n        &lt;div class&#061;&#034;child&#034;&gt;&lt;\/div&gt;<br \/>\n    &lt;\/div&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;     <\/p>\n<ul>\n<li>content: &#034;&#034;&#xff1a;\u5fc5\u987b\u8bbe\u7f6e\u8fd9\u4e2a\u5c5e\u6027&#xff0c;\u5426\u5219\u00a0::after\u00a0\u4f2a\u5143\u7d20\u4e0d\u4f1a\u663e\u793a\u3002<\/li>\n<li>display: block&#xff1a;\u5c06\u4f2a\u5143\u7d20\u8bbe\u7f6e\u4e3a\u5757\u7ea7\u5143\u7d20&#xff0c;\u8fd9\u6837\u5b83\u624d\u80fd\u5360\u636e\u4e00\u884c\u3002<\/li>\n<li>clear: both&#xff1a;\u6e05\u9664\u5de6\u53f3\u4e24\u4fa7\u7684\u6d6e\u52a8&#xff0c;\u4f7f\u7236\u5143\u7d20\u80fd\u591f\u5305\u542b\u6d6e\u52a8\u7684\u5b50\u5143\u7d20\u3002<\/li>\n<li>height: 0&#xff1a;\u5c06\u4f2a\u5143\u7d20\u7684\u9ad8\u5ea6\u8bbe\u7f6e\u4e3a 0&#xff0c;\u907f\u514d\u5176\u5360\u636e\u989d\u5916\u7684\u7a7a\u95f4\u3002<\/li>\n<li>visibility: hidden&#xff1a;\u9690\u85cf\u4f2a\u5143\u7d20&#xff0c;\u4f7f\u5176\u5728\u9875\u9762\u4e0a\u4e0d\u53ef\u89c1\u3002<\/li>\n<\/ul>\n<h4>\u6d6e\u52a8\u7684\u5b9e\u9645\u5e94\u7528&#xff1a;<\/h4>\n<h5>\u8bbe\u7f6e\u5bfc\u822a\u83dc\u5355<\/h5>\n<p>\u5782\u76f4\u5bfc\u822a\u83dc\u5355\u548c\u6c34\u5e73\u5bfc\u822a\u83dc\u5355<\/p>\n<p>&lt;!DOCTYPE html&gt;<br \/>\n&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n    &lt;style&gt;<br \/>\n        \/* \u5782\u76f4\u5bfc\u822a\u83dc\u5355\u6837\u5f0f *\/<br \/>\n        .vertical-menu {<br \/>\n            width: 200px;<br \/>\n            background-color: #f1f1f1;<br \/>\n        }<br \/>\n        .vertical-menu a {<br \/>\n            display: block;<br \/>\n            color: black;<br \/>\n            padding: 12px;<br \/>\n            text-decoration: none;<br \/>\n        }<br \/>\n        .vertical-menu a:hover {<br \/>\n            background-color: #ccc;<br \/>\n        }<br \/>\n        .vertical-menu a.active {<br \/>\n            background-color: #04AA6D;<br \/>\n            color: white;<br \/>\n        }<br \/>\n        \/* \u6c34\u5e73\u5bfc\u822a\u83dc\u5355\u6837\u5f0f *\/<br \/>\n        .horizontal-menu {<br \/>\n            background-color: #333;<br \/>\n            overflow: hidden;<br \/>\n        }<br \/>\n        .horizontal-menu a {<br \/>\n            float: left;<br \/>\n            color: #f2f2f2;<br \/>\n            text-align: center;<br \/>\n            padding: 14px 16px;<br \/>\n            text-decoration: none;<br \/>\n            font-size: 17px;<br \/>\n        }<br \/>\n        .horizontal-menu a:hover {<br \/>\n            background-color: #ddd;<br \/>\n            color: black;<br \/>\n        }<br \/>\n        .horizontal-menu a.active {<br \/>\n            background-color: #04AA6D;<br \/>\n            color: white;<br \/>\n        }<br \/>\n    &lt;\/style&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n    &lt;!&#8211; \u5782\u76f4\u5bfc\u822a\u83dc\u5355 &#8211;&gt;<br \/>\n    &lt;div class&#061;&#034;vertical-menu&#034;&gt;<br \/>\n        &lt;a href&#061;&#034;#&#034; class&#061;&#034;active&#034;&gt;\u4e3b\u9875&lt;\/a&gt;<br \/>\n        &lt;a href&#061;&#034;#&#034;&gt;\u5173\u4e8e&lt;\/a&gt;<br \/>\n        &lt;a href&#061;&#034;#&#034;&gt;\u670d\u52a1&lt;\/a&gt;<br \/>\n        &lt;a href&#061;&#034;#&#034;&gt;\u8054\u7cfb\u6211\u4eec&lt;\/a&gt;<br \/>\n    &lt;\/div&gt;<br \/>\n    &lt;!&#8211; \u6c34\u5e73\u5bfc\u822a\u83dc\u5355 &#8211;&gt;<br \/>\n    &lt;div class&#061;&#034;horizontal-menu&#034;&gt;<br \/>\n        &lt;a class&#061;&#034;active&#034; href&#061;&#034;#&#034;&gt;\u4e3b\u9875&lt;\/a&gt;<br \/>\n        &lt;a href&#061;&#034;#&#034;&gt;\u5173\u4e8e&lt;\/a&gt;<br \/>\n        &lt;a href&#061;&#034;#&#034;&gt;\u670d\u52a1&lt;\/a&gt;<br \/>\n        &lt;a href&#061;&#034;#&#034;&gt;\u8054\u7cfb\u6211\u4eec&lt;\/a&gt;<br \/>\n    &lt;\/div&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;     <\/p>\n<h3 style=\"text-align:center\">\u5b9a\u4f4d<\/h3>\n<p>\u6d6e\u52a8\u65e0\u6cd5\u7cbe\u786e\u5b9a\u4f4d<\/p>\n<p>\u901a\u8fc7CSS\u5b9a\u4f4d&#xff08;CSS position&#xff09;\u53ef\u4ee5\u5b9e\u73b0\u7f51\u9875\u5143\u7d20\u7684\u7cbe \u786e\u5b9a\u4f4d\u3002\u5143\u7d20\u7684\u5b9a\u4f4d\u5c5e\u6027\u4e3b\u8981\u5305\u62ec \u5b9a\u4f4d\u6a21\u5f0f\u548c\u8fb9\u504f\u79fb\u4e24\u90e8\u5206\u3002<\/p>\n<h4>\u5b9a\u4f4d\u6a21\u5f0f<\/h4>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td>static<\/td>\n<td>\n<p>\u9759\u6001\u5b9a\u4f4d&#xff08;\u9ed8\u8ba4&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>relative<\/td>\n<td>\u76f8\u5bf9\u5b9a\u4f4d&#xff08;\u76f8\u5bf9\u4e8e\u539f\u6587\u6863\u6d41\u4f4d\u7f6e&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>absolute<\/td>\n<td>\u7edd\u5bf9\u5b9a\u4f4d&#xff08;\u76f8\u5bf9\u4e8e\u4e0a\u4e00\u4e2a\u5df2\u5b9a\u4f4d\u5143\u7d20&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>fixed<\/td>\n<td>\u56fa\u5b9a\u5b9a\u4f4d&#xff08;\u76f8\u5bf9\u4e8e\u6d4f\u89c8\u5668\u7a97\u53e3&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>static&#xff08;\u9759\u6001\u5b9a\u4f4d&#xff09;\u00a0<\/h5>\n<p>\u5728\u9759\u6001\u5b9a\u4f4d\u72b6\u6001\u4e0b&#xff0c;\u65e0\u6cd5\u901a\u8fc7\u8fb9\u504f\u79fb\u5c5e\u6027&#xff08;top\u3001 bottom\u3001left\u6216right&#xff09;\u6765\u6539\u53d8\u5143\u7d20\u7684\u4f4d\u7f6e\u3002<\/p>\n<h5>relative&#xff08;\u76f8\u5bf9\u5b9a\u4f4d&#xff09;<\/h5>\n<p>\u504f\u79fb\u4e4b\u540e\u5728\u539f\u6587\u6863\u6d41\u7684\u4f4d\u7f6e<span style=\"color:#fe2c24\">\u4ecd\u7136\u4fdd\u7559<\/span>\u7740<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"482\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091520-6819d32808462.png\" width=\"774\" \/><\/p>\n<h5>absolute&#xff08;\u7edd\u5bf9\u5b9a\u4f4d&#xff09;<\/h5>\n<p>\u7edd\u5bf9\u5b9a\u4f4d\u662f\u5c06\u5143\u7d20\u4f9d\u636e\u6700\u8fd1\u7684\u5df2\u7ecf\u5b9a\u4f4d&#xff08;\u7edd\u5bf9\u3001\u56fa\u5b9a\u6216\u76f8\u5bf9\u5b9a\u4f4d&#xff09;\u7684\u7236\u5143\u7d20 \u8fdb\u884c\u5b9a\u4f4d&#xff0c;\u82e5\u6240\u6709\u7236\u5143\u7d20\u90fd\u6ca1\u6709\u5b9a\u4f4d&#xff0c;\u5219\u4f9d\u636ebody\u6839\u5143\u7d20&#xff08;\u6d4f\u89c8\u5668\u7a97\u53e3&#xff09; \u8fdb\u884c\u5b9a\u4f4d\u3002<\/p>\n<p>\u5728\u539f\u6587\u6863\u6d41\u4e2d\u7684\u4f4d\u7f6e<span style=\"color:#fe2c24\">\u4e0d\u4fdd\u7559<\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"388\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091520-6819d328303c0.png\" width=\"828\" \/><\/p>\n<h4>\u8fb9\u504f\u79fb<\/h4>\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td>top<\/td>\n<td>\u76f8\u5bf9\u4e8e\u5176\u539f\u4f4d\u7f6e\u6216\u7236\u5143\u7d20\u4e0a\u8fb9\u7ebf\u7684\u8ddd\u79bb<\/td>\n<\/tr>\n<tr>\n<td>\n<p>bottom<\/p>\n<\/td>\n<td>\u76f8\u5bf9\u4e8e\u5176\u539f\u4f4d\u7f6e\u6216\u7236\u5143\u7d20\u4e0b\u8fb9\u7ebf\u7684\u8ddd\u79bb<\/td>\n<\/tr>\n<tr>\n<td>left<\/td>\n<td>\u76f8\u5bf9\u4e8e\u5176\u539f\u4f4d\u7f6e\u6216\u7236\u5143\u7d20\u5de6\u8fb9\u7ebf\u7684\u8ddd\u79bb<\/td>\n<\/tr>\n<tr>\n<td>right<\/td>\n<td>\u76f8\u5bf9\u4e8e\u5176\u539f\u4f4d\u7f6e\u6216\u7236\u5143\u7d20\u53f3\u8fb9\u7ebf\u7684\u8ddd\u79bb<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u8865\u5145<\/h4>\n<h5>z-index<\/h5>\n<p>\u5f53\u5bf9\u591a\u4e2a\u5143\u7d20\u540c\u65f6\u8bbe\u7f6e\u5b9a\u4f4d\u65f6&#xff0c;\u5b9a\u4f4d\u5143\u7d20\u4e4b\u95f4\u6709\u53ef\u80fd\u4f1a\u53d1\u751f\u91cd\u53e0.<\/p>\n<p>z-index\u53ef\u4ee5\u8c03\u6574\u91cd\u53e0\u5b9a\u4f4d\u5143\u7d20\u7684\u5806\u53e0\u987a\u5e8f&#xff0c;\u5176\u53d6\u503c\u53ef\u4e3a\u6b63\u6574\u6570\u3001\u8d1f\u6574\u6570\u548c0\u3002z-index\u7684\u9ed8\u8ba4\u503c\u662f0.<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"275\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091520-6819d3285113c.png\" width=\"377\" \/><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb840\u6b21\uff0c\u70b9\u8d5e12\u6b21\uff0c\u6536\u85cf19\u6b21\u3002CSS\uff08Cascading Style Sheets\uff09\uff0c\u4e2d\u6587\u540d\u4e3a\u7ea7\u8054\u6837\u5f0f\u8868\uff0c\u4e5f\u6709\u79f0\u4e3a\u5c42\u53e0\u6837\u5f0f\u8868\uff0c\u5c42\u53e0\u5c31\u662f\u6837\u5f0f\u53ef\u4ee5\u5c42\u5c42\u53e0\u52a0\uff0c\u53ef\u4ee5\u5bf9\u4e00\u4e2a\u5143\u7d20\u591a\u6b21\u8bbe\u7f6e\u6837\u5f0f\uff0c\u540e\u9762\u5b9a\u4e49\u7684\u6837\u5f0f\u4f1a\u5bf9\u524d\u9762\u5b9a\u4e49\u7684\u6837\u5f0f\u8fdb\u884c\u91cd\u5199\u3002CSS\u662f\u4e00\u79cd\u7528\u6765\u8868\u73b0HTML\uff08\u6807\u51c6\u901a\u7528\u6807\u8bb0\u8bed\u8a00\u7684\u4e00\u4e2a\u5e94\u7528\uff09\u6216XML\uff08\u6807\u51c6\u901a\u7528\u6807\u8bb0\u8bed\u8a00\u7684\u4e00\u4e2a\u5b50\u96c6\uff09\u7b49\u6587\u4ef6\u6837\u5f0f\u7684\u8ba1\u7b97\u673a\u8bed\u8a00\u3002<\/p>\n","protected":false},"author":2,"featured_media":35723,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[573,187,87,371,305],"topic":[],"class_list":["post-35732","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-css","tag-javascript","tag-87","tag-371","tag-305"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CSS\u5b66\u4e60\u7b14\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/35732.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CSS\u5b66\u4e60\u7b14\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb840\u6b21\uff0c\u70b9\u8d5e12\u6b21\uff0c\u6536\u85cf19\u6b21\u3002CSS\uff08Cascading Style Sheets\uff09\uff0c\u4e2d\u6587\u540d\u4e3a\u7ea7\u8054\u6837\u5f0f\u8868\uff0c\u4e5f\u6709\u79f0\u4e3a\u5c42\u53e0\u6837\u5f0f\u8868\uff0c\u5c42\u53e0\u5c31\u662f\u6837\u5f0f\u53ef\u4ee5\u5c42\u5c42\u53e0\u52a0\uff0c\u53ef\u4ee5\u5bf9\u4e00\u4e2a\u5143\u7d20\u591a\u6b21\u8bbe\u7f6e\u6837\u5f0f\uff0c\u540e\u9762\u5b9a\u4e49\u7684\u6837\u5f0f\u4f1a\u5bf9\u524d\u9762\u5b9a\u4e49\u7684\u6837\u5f0f\u8fdb\u884c\u91cd\u5199\u3002CSS\u662f\u4e00\u79cd\u7528\u6765\u8868\u73b0HTML\uff08\u6807\u51c6\u901a\u7528\u6807\u8bb0\u8bed\u8a00\u7684\u4e00\u4e2a\u5e94\u7528\uff09\u6216XML\uff08\u6807\u51c6\u901a\u7528\u6807\u8bb0\u8bed\u8a00\u7684\u4e00\u4e2a\u5b50\u96c6\uff09\u7b49\u6587\u4ef6\u6837\u5f0f\u7684\u8ba1\u7b97\u673a\u8bed\u8a00\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/35732.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-06T09:15:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091519-6819d327a5eb4.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/35732.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/35732.html\",\"name\":\"CSS\u5b66\u4e60\u7b14\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-06T09:15:21+00:00\",\"dateModified\":\"2025-05-06T09:15:21+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/35732.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/35732.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/35732.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS\u5b66\u4e60\u7b14\u8bb0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CSS\u5b66\u4e60\u7b14\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/35732.html","og_locale":"zh_CN","og_type":"article","og_title":"CSS\u5b66\u4e60\u7b14\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb840\u6b21\uff0c\u70b9\u8d5e12\u6b21\uff0c\u6536\u85cf19\u6b21\u3002CSS\uff08Cascading Style Sheets\uff09\uff0c\u4e2d\u6587\u540d\u4e3a\u7ea7\u8054\u6837\u5f0f\u8868\uff0c\u4e5f\u6709\u79f0\u4e3a\u5c42\u53e0\u6837\u5f0f\u8868\uff0c\u5c42\u53e0\u5c31\u662f\u6837\u5f0f\u53ef\u4ee5\u5c42\u5c42\u53e0\u52a0\uff0c\u53ef\u4ee5\u5bf9\u4e00\u4e2a\u5143\u7d20\u591a\u6b21\u8bbe\u7f6e\u6837\u5f0f\uff0c\u540e\u9762\u5b9a\u4e49\u7684\u6837\u5f0f\u4f1a\u5bf9\u524d\u9762\u5b9a\u4e49\u7684\u6837\u5f0f\u8fdb\u884c\u91cd\u5199\u3002CSS\u662f\u4e00\u79cd\u7528\u6765\u8868\u73b0HTML\uff08\u6807\u51c6\u901a\u7528\u6807\u8bb0\u8bed\u8a00\u7684\u4e00\u4e2a\u5e94\u7528\uff09\u6216XML\uff08\u6807\u51c6\u901a\u7528\u6807\u8bb0\u8bed\u8a00\u7684\u4e00\u4e2a\u5b50\u96c6\uff09\u7b49\u6587\u4ef6\u6837\u5f0f\u7684\u8ba1\u7b97\u673a\u8bed\u8a00\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/35732.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-06T09:15:21+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250506091519-6819d327a5eb4.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"18 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/35732.html","url":"https:\/\/www.wsisp.com\/helps\/35732.html","name":"CSS\u5b66\u4e60\u7b14\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-06T09:15:21+00:00","dateModified":"2025-05-06T09:15:21+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/35732.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/35732.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/35732.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"CSS\u5b66\u4e60\u7b14\u8bb0"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/35732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=35732"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/35732\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/35723"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=35732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=35732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=35732"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=35732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}