{"id":507,"date":"2024-04-04T23:23:48","date_gmt":"2024-04-04T15:23:48","guid":{"rendered":"https:\/\/levin.ink\/?p=507"},"modified":"2024-06-17T23:35:27","modified_gmt":"2024-06-17T15:35:27","slug":"first-floor-2-css","status":"publish","type":"post","link":"https:\/\/levin.ink\/?p=507","title":{"rendered":"CSS &#8211; 2 CSS"},"content":{"rendered":"<h1>CSS\uff1fCSS3\uff01<\/h1>\n<p><a href=\"https:\/\/objtube.github.io\/front-end-roadmap\/#\/front-end-roadmap\/guide\/css\">CSS<\/a><\/p>\n<p><strong>Important<\/strong><\/p>\n<ul>\n<li>\u5e03\u5c40\uff08\u76d2\u6a21\u578b\u3001\u5b9a\u4f4d\u3001\u6d6e\u52a8\u3001flex\u7b49\uff09[[First floor - 2 CSS#\u76d2\u5b50-\u5e03\u5c40Overflow]]<\/li>\n<li>\u54cd\u5e94\u5f0f\u8bbe\u8ba1<\/li>\n<li>px\/rem\/em\/vw\/wh \u7684\u533a\u522b<\/li>\n<li>\u9009\u62e9\u5668[[First floor - 2 CSS#\u9009\u62e9\u5668]]\u3001\u4f2a\u7c7b[[First floor - 2 CSS#\u4f2a\u7c7b]]<\/li>\n<li>\u52a8\u753b\u3001transition<\/li>\n<\/ul>\n<h2>\u7b80\u4ecb<\/h2>\n<p>CSS\uff1a<strong>C<\/strong>ascading\u00a0<strong>S<\/strong>tyle\u00a0<strong>S<\/strong>heets<br \/>\nCSS\u58f0\u660e\uff1a<\/p>\n<pre><code class=\"language-CSS\">\/*\u6ce8\u91ca*\/\np \n{\n\tcolor : red;\n\t\/*\u6ce8\u91ca*\/\n\ttext-align : center;\n}\n<\/code><\/pre>\n<pre><code class=\"language-CSS\">\/*id\u9009\u62e9\u5668\uff0c\u72ec\u4e00\u65e0\u4e8c\uff08\u4e0d\u8981\u4ee5\u6570\u5b57\u5f00\u5934\uff09*\/\n#para1\n{\n\tcolor : red;\n\ttext-align : center;\n}\n<\/code><\/pre>\n<pre><code class=\"language-CSS\">\/*class\u9009\u62e9\u5668\uff0c\u53ef\u4ee5\u5728\u591a\u4e2a\u5143\u7d20\u4e2d\u4f7f\u7528\uff08\u4e0d\u8981\u4ee5\u6570\u5b57\u5f00\u5934\uff09*\/\n.center\n{\n\ttext-align : center;\n}\n<\/code><\/pre>\n<p>\u5f53\u7136\u4f60\u8fd8\u53ef\u4ee5\uff0c\u5d4c\u5957\uff01<\/p>\n<pre><code class=\"language-CSS\">p.center\n{\n\ttext-align : center;\n}\n<\/code><\/pre>\n<h2>\u6765\u4e00\u4e2a\uff1fCSS\u521b\u5efa<\/h2>\n<p>\u4e09\u79cd\u65b9\u5f0f\uff1a<\/p>\n<h3>\u5916\u90e8\u6837\u5f0f\u8868(External style sheet)<\/h3>\n<p>\u6709\u4e00\u4e2a\u989d\u5916\u7684.css\u6587\u4ef6\uff0c\u9002\u5408\u5927\u90e8\u5206\u60c5\u51b5<br \/>\n\u5f15\u7528\uff1a<\/p>\n<pre><code class=\"language-html\">&lt;head&gt;\n&lt;link rel=&quot;stylesheet&quot; type=&quot;text\/css&quot; href=&quot;mystyle.css&quot;&gt;\n&lt;\/head&gt;\n<\/code><\/pre>\n<p>rel\uff1a\u89c4\u5b9a\u5f53\u524d\u6587\u6863\u4e0e\u88ab\u94fe\u63a5\u6587\u6863\u4e4b\u95f4\u7684\u5173\u7cfb\u3002<br \/>\ntype\uff1a\u4ee3\u8868\u88ab\u94fe\u63a5\u6587\u6863\u7684MIME\u7c7b\u578b\u3002<\/p>\n<ul>\n<li>MIME\u7c7b\u578b\u63cf\u8ff0\u6587\u4ef6\u7684\u5185\u5bb9\u7c7b\u578b<\/li>\n<li>text\/html\uff1a\u8868\u793a HTML \u6587\u4ef6\uff0c<\/li>\n<li>text\/plain\uff1a\u8868\u793a\u7eaf\u6587\u672c\u6587\u4ef6\u3002<br \/>\nhref: \u94fe\u63a5\u6587\u4ef6<br \/>\n&lt;hr&gt;<br \/>\ncss\u6587\u4ef6\uff1a<br \/>\n\u4e0d\u80fd\u5305\u542b\u4efb\u4f55\u7684html\u6807\u7b7e\uff0c\u5982\u4e0b<\/li>\n<\/ul>\n<pre><code class=\"language-css\">hr \n{\n\tcolor:sienna;\n} \np \n{\n\tmargin-left:20px;\n} \nbody \n{\n\tbackground-image:url(&quot;\/images\/back40.gif&quot;);\n}\n<\/code><\/pre>\n<blockquote>\n<p>\u4e0d\u8981\u5728\u5c5e\u6027\u503c\u4e0e\u5355\u4f4d\u4e4b\u95f4\u7559\u6709\u7a7a\u683c\uff08\u5982&quot;20 px&quot;\uff09\uff0c\u6b63\u786e\u7684\u5199\u6cd5\u662f &quot;20px&quot; \u3002<\/p>\n<\/blockquote>\n<h3>\u5185\u90e8\u6837\u5f0f\u8868(Internal style sheet)<\/h3>\n<p>\u9002\u5408\u5355\u4e2a\u6587\u6863\u9700\u8981\u7279\u6b8a\u7684\u6837\u5f0f\u7684\u60c5\u51b5\uff0c\u5b9a\u4e49\u5728&lt;style&gt;\u6807\u7b7e\u5185\u90e8<\/p>\n<pre><code class=\"language-html\">&lt;head&gt;\n&lt;style&gt;\nhr\n{\n\tcolor:sienna;\n}\np\n{\n\tmargin-left:20px;\n}\nbody\n{\n\tbackground-image:url(&quot;\/images\/back40.gif&quot;);\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n<\/code><\/pre>\n<h3>\u5185\u8054\u6837\u5f0f(Inline style)<\/h3>\n<p>\u5c06\u8868\u73b0\u548c\u5185\u5bb9\u4e00\u8d77\uff0c\u8bf7\u614e\u7528\uff0c\u9002\u7528\u4e0e\u4ec5\u9700\u8981\u5728\u67d0\u4e2a\u5143\u7d20\u4e0a\u5e94\u7528\u4e00\u6b21\u65f6<\/p>\n<pre><code class=\"language-html\">&lt;p style=&quot;color:sienna;margin-left:20px&quot;&gt;\u8fd9\u662f\u4e00\u4e2a\u6bb5\u843d\u3002&lt;\/p&gt;\n<\/code><\/pre>\n<h3>\u591a\u91cd\u6837\u5f0f\uff0c\u5957\u5a03\uff0c\u5c0f\u5b50<\/h3>\n<pre><code class=\"language-css\">\/*\u5916\u90e8css*\/\nh3 { color:red; text-align:left; font-size:8pt; }\n<\/code><\/pre>\n<pre><code class=\"language-html\">\/*\u5185\u90e8\u6837\u5f0f\u8868*\/\n&lt;style&gt;\nh3 { text-align:right; font-size:20pt; }\n&lt;\/style&gt;\n<\/code><\/pre>\n<p>\u6700\u7ec8\u5f97\u5230<\/p>\n<pre><code class=\"language-css\">color:red; \ntext-align:right; \nfont-size:20pt;\n<\/code><\/pre>\n<h4>\u4f18\u5148\u7ea7<\/h4>\n<p>\u8d8a\u8fd1\u8d8a\u4f18\u5148<br \/>\n<strong>\uff08\u5185\u8054\u6837\u5f0f\uff09Inline style &gt; \uff08\u5185\u90e8\u6837\u5f0f\uff09Internal style sheet &gt;\uff08\u5916\u90e8\u6837\u5f0f\uff09External style sheet &gt; \u6d4f\u89c8\u5668\u9ed8\u8ba4\u6837\u5f0f<\/strong><br \/>\n[[CSS-\u591a\u91cd\u6837\u5f0f\u4f18\u5148\u7ea7\u6df1\u5165\u6982\u5ff5]]<\/p>\n<h3>\u9009\u62e9\u5668<\/h3>\n<h4>\u5206\u7ec4\u9009\u62e9\u5668<\/h4>\n<pre><code class=\"language-css\">h1,h2,p \n{ \n\tcolor:green; \n}\n<\/code><\/pre>\n<p>\u76f8\u540c\u7684\u53ef\u4ee5\u4e00\u8d77\u58f0\u660e<\/p>\n<h4>\u5d4c\u5957\u9009\u62e9\u5668<\/h4>\n<pre><code class=\"language-css\">p \n{ \n\tcolor:blue; \n\ttext-align:center; \n} \n.marked \n{ \n\tbackground-color:red; \n} \n.marked p \n{ \n\tcolor:white; \n} \np.marked\n{ \n\ttext-decoration:underline; \n}\n<\/code><\/pre>\n<ul>\n<li>p{ }: \u4e3a\u6240\u6709\u00a0<strong>p<\/strong>\u00a0\u5143\u7d20\u6307\u5b9a\u4e00\u4e2a\u6837\u5f0f\u3002<\/li>\n<li>.marked{ }: \u4e3a\u6240\u6709\u00a0<strong>class=&quot;marked&quot;<\/strong>\u00a0\u7684\u5143\u7d20\u6307\u5b9a\u4e00\u4e2a\u6837\u5f0f\u3002<\/li>\n<li>.marked p{ }: \u4e3a\u6240\u6709\u00a0<strong>class=&quot;marked&quot;<\/strong>\u00a0\u5143\u7d20\u5185\u7684\u00a0<strong>p<\/strong>\u00a0\u5143\u7d20\u6307\u5b9a\u4e00\u4e2a\u6837\u5f0f\u3002<\/li>\n<li>p.marked{ }: \u4e3a\u6240\u6709\u00a0<strong>class=&quot;marked&quot;<\/strong>\u00a0\u7684\u00a0<strong>p<\/strong>\u00a0\u5143\u7d20\u6307\u5b9a\u4e00\u4e2a\u6837\u5f0f\u3002<\/li>\n<\/ul>\n<h4>\u540e\u4ee3\u9009\u62e9\u5668<\/h4>\n<p>\u9009\u62e9\u6240\u6709div\u4e2d\u7684p\u5143\u7d20<\/p>\n<pre><code class=\"language-css\">div p\n{\n\tbackground-color:yellow;\n}\n<\/code><\/pre>\n<h4>\u5b50\u5143\u7d20\u9009\u62e9\u5668<\/h4>\n<p>\u53ea\u80fd\u9009\u62e9\u6240\u6709div\u7684\u76f4\u63a5\uff08\u4e00\u7ea7\uff09\u5b50p\u5143\u7d20<\/p>\n<pre><code class=\"language-css\">div &gt; p\n{\n\tbackground-color:yellow;\n}\n<\/code><\/pre>\n<h4>\u76f8\u90bb\u5144\u5f1f\u9009\u62e9\u5668<\/h4>\n<p>\u9009\u62e9\u7d27\u8d34div\u5143\u7d20\u540e\u7684\u7b2c\u4e00\u4e2ap\u5143\u7d20\uff0c\u5b83\u4eec\u6709\u5171\u540c\u7684\u7236\u5143\u7d20<\/p>\n<pre><code class=\"language-css\">div + p\n{\n\tbackground-color:yellow;\n}\n<\/code><\/pre>\n<h4>\u540e\u7eed\u5144\u5f1f\u9009\u62e9\u5668<\/h4>\n<p>\u9009\u62e9\u6240\u6709div\u5143\u7d20\u540e\u7684p\u5143\u7d20<\/p>\n<pre><code class=\"language-css\">div - p\n{\n\tbackground-color:yellow;\n}\n<\/code><\/pre>\n<h4>\u5c5e\u6027\u9009\u62e9\u5668<\/h4>\n<p>html\u5143\u7d20\u5c5e\u6027\uff1a\u5b9a\u4e49\u5728\u5c16\u62ec\u53f7\u5185\u7684\u5185\u5bb9\uff0c\u5982class\uff0cid\u7b49<\/p>\n<pre><code class=\"language-css\">[title] {\n\tcolor:blue;\n}\n<\/code><\/pre>\n<h4>\u9009\u62e9\u6307\u5b9a\u8981\u6c42\u7684\u5c5e\u6027<\/h4>\n<pre><code class=\"language-css\">\/*\u72ec\u7acb\u5b8c\u6574\u5305\u542b\u6307\u5b9a\u503c*\/\n[title ~= hello]\n&lt;img src=&quot;.jpg&quot; title=&quot;hello world!&quot; \/&gt;\n\n\/*\u5305\u542b\u6307\u5b9a\u503c\uff0c\u4e0d\u5fc5\u72ec\u7acb*\/\n[title *= hello]\n&lt;img src=&quot;.jpg&quot; title=&quot;hhhhellooooooo&quot; \/&gt;\n\n\/*\u4ee5\u72ec\u7acb\u5b8c\u6574\u7684\u6307\u5b9a\u503c\u5f00\u5934*\/\n[lang |= en]\n&lt;p lang=&quot;en&quot;&gt;  &lt;p lang=&quot;en-us&quot;&gt;\n\n\/*\u4ee5\u6307\u5b9a\u503c\u5f00\u5934\uff0c\u4e0d\u5fc5\u72ec\u7acb*\/\n[lang ^= en]\n&lt;p lang=&quot;ennn&quot;&gt;\n\n\/*\u4ee5\u6307\u5b9a\u503c\u7ed3\u5c3e*\/\n[src $= .pdf]\n&lt;a src=&quot;xxx.pdf&quot; \/&gt;\n<\/code><\/pre>\n<h4>\u8868\u5355\u6837\u5f0f<\/h4>\n<pre><code class=\"language-css\">input[type=&quot;text&quot;]\n{\n    width:150px;\n    display:block;\n    margin-bottom:10px;\n    background-color:yellow;\n}\ninput[type=&quot;button&quot;]\n{\n    width:120px;\n    margin-left:35px;\n    display:block;\n}\n<\/code><\/pre>\n<h2>\u5c5e\u6027<\/h2>\n<p>\u4ee5\u4e0b\u662f\u5b9a\u4e49\u5728CSS\u5927\u62ec\u53f7\u5185\u7684\u5185\u5bb9<\/p>\n<h3>\u80cc\u666f<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">Property<\/th>\n<th style=\"text-align:left\">\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-background.html\">background<\/a><\/td>\n<td style=\"text-align:left\">\u7b80\u5199\u5c5e\u6027\uff0c\u4f5c\u7528\u662f\u5c06\u80cc\u666f\u5c5e\u6027\u8bbe\u7f6e\u5728\u4e00\u4e2a\u58f0\u660e\u4e2d\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-background-attachment.html\">background-attachment<\/a><\/td>\n<td style=\"text-align:left\">\u80cc\u666f\u56fe\u50cf\u662f\u5426\u56fa\u5b9a\u6216\u8005\u968f\u7740\u9875\u9762\u7684\u5176\u4f59\u90e8\u5206\u6eda\u52a8\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-background-color.html\">background-color<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5143\u7d20\u7684\u80cc\u666f\u989c\u8272\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-background-image.html\">background-image<\/a><\/td>\n<td style=\"text-align:left\">\u628a\u56fe\u50cf\u8bbe\u7f6e\u4e3a\u80cc\u666f\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-background-position.html\">background-position<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u80cc\u666f\u56fe\u50cf\u7684\u8d77\u59cb\u4f4d\u7f6e\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-background-repeat.html\">background-repeat<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u80cc\u666f\u56fe\u50cf\u662f\u5426\u53ca\u5982\u4f55\u91cd\u590d\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u6587\u672c<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u5c5e\u6027<\/th>\n<th style=\"text-align:left\">\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-text-color.html\">color<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u6587\u672c\u989c\u8272<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-text-direction.html\">direction<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u6587\u672c\u65b9\u5411\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-text-letter-spacing.html\">letter-spacing<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5b57\u7b26\u95f4\u8ddd<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-dim-line-height.html\">line-height<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u884c\u9ad8<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-text-text-align.html\">text-align<\/a><\/td>\n<td style=\"text-align:left\">\u5bf9\u9f50\u5143\u7d20\u4e2d\u7684\u6587\u672c<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-text-text-decoration.html\">text-decoration<\/a><\/td>\n<td style=\"text-align:left\">\u5411\u6587\u672c\u6dfb\u52a0\u4fee\u9970<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-text-text-indent.html\">text-indent<\/a><\/td>\n<td style=\"text-align:left\">\u7f29\u8fdb\u5143\u7d20\u4e2d\u6587\u672c\u7684\u9996\u884c<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-text-shadow.html\">text-shadow<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u6587\u672c\u9634\u5f71<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-text-text-transform.html\">text-transform<\/a><\/td>\n<td style=\"text-align:left\">\u63a7\u5236\u5143\u7d20\u4e2d\u7684\u5b57\u6bcd<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-text-unicode-bidi.html\">unicode-bidi<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u6216\u8fd4\u56de\u6587\u672c\u662f\u5426\u88ab\u91cd\u5199<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-pos-vertical-align.html\">vertical-align<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5143\u7d20\u7684\u5782\u76f4\u5bf9\u9f50<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-text-white-space.html\">white-space<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5143\u7d20\u4e2d\u7a7a\u767d\u7684\u5904\u7406\u65b9\u5f0f<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-text-word-spacing.html\">word-spacing<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5b57\u95f4\u8ddd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5b57\u4f53<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">Property<\/th>\n<th style=\"text-align:left\">\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-font-font.html\">font<\/a><\/td>\n<td style=\"text-align:left\">\u5728\u4e00\u4e2a\u58f0\u660e\u4e2d\u8bbe\u7f6e\u6240\u6709\u7684\u5b57\u4f53\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-font-font-family.html\">font-family<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u6587\u672c\u7684\u5b57\u4f53\u7cfb\u5217<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-font-font-size.html\">font-size<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u6587\u672c\u7684\u5b57\u4f53\u5927\u5c0f<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-font-font-style.html\">font-style<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u6587\u672c\u7684\u5b57\u4f53\u6837\u5f0f<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-font-font-variant.html\">font-variant<\/a><\/td>\n<td style=\"text-align:left\">\u4ee5\u5c0f\u578b\u5927\u5199\u5b57\u4f53\u6216\u8005\u6b63\u5e38\u5b57\u4f53\u663e\u793a\u6587\u672c\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-font-weight.html\">font-weight<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u5b57\u4f53\u7684\u7c97\u7ec6\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5217\u8868<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u5c5e\u6027<\/th>\n<th style=\"text-align:left\">\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-list-style.html\">list-style<\/a><\/td>\n<td style=\"text-align:left\">\u7b80\u5199\u5c5e\u6027\u3002\u7528\u4e8e\u628a\u6240\u6709\u7528\u4e8e\u5217\u8868\u7684\u5c5e\u6027\u8bbe\u7f6e\u4e8e\u4e00\u4e2a\u58f0\u660e\u4e2d<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-list-style-image.html\">list-style-image<\/a><\/td>\n<td style=\"text-align:left\">\u5c06\u56fe\u50cf\u8bbe\u7f6e\u4e3a\u5217\u8868\u9879\u6807\u5fd7\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-list-style-position.html\">list-style-position<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5217\u8868\u4e2d\u5217\u8868\u9879\u6807\u5fd7\u7684\u4f4d\u7f6e\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-list-style-type.html\">list-style-type<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5217\u8868\u9879\u6807\u5fd7\u7684\u7c7b\u578b\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u76d2\u5b50\u6a21\u578b[!Important]<\/h3>\n<p>\u6240\u6709HTML\u5143\u7d20\u90fd\u53ef\u4ee5\u770b\u4f5c\u76d2\u5b50\uff0c\u5177\u6709\u4e00\u4e9b\u901a\u7528\u7684\u5c5e\u6027<br \/>\n<img decoding=\"async\" src=\"https:\/\/levin.ink\/wp-content\/uploads\/2024\/04\/box-model-1.gif\" alt=\"box-model.gif\"><\/p>\n<ul>\n<li><strong>Margin(\u5916\u8fb9\u8ddd)<\/strong>\u00a0- \u6e05\u9664\u8fb9\u6846\u5916\u7684\u533a\u57df\uff0c\u5916\u8fb9\u8ddd\u662f\u900f\u660e\u7684\u3002<\/li>\n<li><strong>Border(\u8fb9\u6846)<\/strong>\u00a0- \u56f4\u7ed5\u5728\u5185\u8fb9\u8ddd\u548c\u5185\u5bb9\u5916\u7684\u8fb9\u6846\u3002<\/li>\n<li><strong>Padding(\u5185\u8fb9\u8ddd)<\/strong>\u00a0- \u6e05\u9664\u5185\u5bb9\u5468\u56f4\u7684\u533a\u57df\uff0c\u5185\u8fb9\u8ddd\u662f\u900f\u660e\u7684\u3002<\/li>\n<li><strong>Content(\u5185\u5bb9)<\/strong>\u00a0- \u76d2\u5b50\u7684\u5185\u5bb9\uff0c\u663e\u793a\u6587\u672c\u548c\u56fe\u50cf\u3002<\/li>\n<\/ul>\n<blockquote>\n<p>\u5f53\u60a8\u6307\u5b9a\u4e00\u4e2a CSS \u5143\u7d20\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u5c5e\u6027\u65f6\uff0c\u4f60\u53ea\u662f\u8bbe\u7f6e\u5185\u5bb9\u533a\u57df\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u3002\u8981\u77e5\u9053\uff0c\u5b8c\u6574\u5927\u5c0f\u7684\u5143\u7d20\uff0c\u4f60\u8fd8\u5fc5\u987b\u6dfb\u52a0\u5185\u8fb9\u8ddd\uff0c\u8fb9\u6846\u548c\u5916\u8fb9\u8ddd\u3002<\/p>\n<\/blockquote>\n<pre><code class=\"language-css\">div \n{ \n\twidth: 300px; \n\tborder: 25px solid green; \n\tpadding: 25px; \n\tmargin: 25px; \n}\n<\/code><\/pre>\n<h3>\u76d2\u5b50-\u8fb9\u6846Border<\/h3>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border.html\" title=\"CSS border \u5c5e\u6027\">border<\/a><\/td>\n<td>\u7b80\u5199\u5c5e\u6027\uff0c\u7528\u4e8e\u628a\u9488\u5bf9\u56db\u4e2a\u8fb9\u7684\u5c5e\u6027\u8bbe\u7f6e\u5728\u4e00\u4e2a\u58f0\u660e\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-style.html\" title=\"CSS border-style \u5c5e\u6027\">border-style<\/a><\/td>\n<td>\u7528\u4e8e\u8bbe\u7f6e\u5143\u7d20\u6240\u6709\u8fb9\u6846\u7684\u6837\u5f0f\uff0c\u6216\u8005\u5355\u72ec\u5730\u4e3a\u5404\u8fb9\u8bbe\u7f6e\u8fb9\u6846\u6837\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-width.html\" title=\"CSS border-width \u5c5e\u6027\">border-width<\/a><\/td>\n<td>\u7b80\u5199\u5c5e\u6027\uff0c\u7528\u4e8e\u4e3a\u5143\u7d20\u7684\u6240\u6709\u8fb9\u6846\u8bbe\u7f6e\u5bbd\u5ea6\uff0c\u6216\u8005\u5355\u72ec\u5730\u4e3a\u5404\u8fb9\u8fb9\u6846\u8bbe\u7f6e\u5bbd\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-color.html\" title=\"CSS border-color \u5c5e\u6027\">border-color<\/a><\/td>\n<td>\u7b80\u5199\u5c5e\u6027\uff0c\u8bbe\u7f6e\u5143\u7d20\u7684\u6240\u6709\u8fb9\u6846\u4e2d\u53ef\u89c1\u90e8\u5206\u7684\u989c\u8272\uff0c\u6216\u4e3a 4 \u4e2a\u8fb9\u5206\u522b\u8bbe\u7f6e\u989c\u8272\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-bottom.html\" title=\"CSS border-bottom \u5c5e\u6027\">border-bottom<\/a><\/td>\n<td>\u7b80\u5199\u5c5e\u6027\uff0c\u7528\u4e8e\u628a\u4e0b\u8fb9\u6846\u7684\u6240\u6709\u5c5e\u6027\u8bbe\u7f6e\u5230\u4e00\u4e2a\u58f0\u660e\u4e2d\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-bottom-color.html\" title=\"CSS border-bottom-color \u5c5e\u6027\">border-bottom-color<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u4e0b\u8fb9\u6846\u7684\u989c\u8272\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-bottom-style.html\" title=\"CSS border-bottom-style \u5c5e\u6027\">border-bottom-style<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u4e0b\u8fb9\u6846\u7684\u6837\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-bottom-width.html\" title=\"CSS border-bottom-width \u5c5e\u6027\">border-bottom-width<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u4e0b\u8fb9\u6846\u7684\u5bbd\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-left.html\" title=\"CSS border-left \u5c5e\u6027\">border-left<\/a><\/td>\n<td>\u7b80\u5199\u5c5e\u6027\uff0c\u7528\u4e8e\u628a\u5de6\u8fb9\u6846\u7684\u6240\u6709\u5c5e\u6027\u8bbe\u7f6e\u5230\u4e00\u4e2a\u58f0\u660e\u4e2d\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-left-color.html\" title=\"CSS border-left-color \u5c5e\u6027\">border-left-color<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u5de6\u8fb9\u6846\u7684\u989c\u8272\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-left-style.html\" title=\"CSS border-left-style \u5c5e\u6027\">border-left-style<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u5de6\u8fb9\u6846\u7684\u6837\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-left-width.html\" title=\"CSS border-left-width \u5c5e\u6027\">border-left-width<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u5de6\u8fb9\u6846\u7684\u5bbd\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-right.html\" title=\"CSS border-right \u5c5e\u6027\">border-right<\/a><\/td>\n<td>\u7b80\u5199\u5c5e\u6027\uff0c\u7528\u4e8e\u628a\u53f3\u8fb9\u6846\u7684\u6240\u6709\u5c5e\u6027\u8bbe\u7f6e\u5230\u4e00\u4e2a\u58f0\u660e\u4e2d\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-right-color.html\" title=\"CSS border-right-color \u5c5e\u6027\">border-right-color<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u53f3\u8fb9\u6846\u7684\u989c\u8272\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-right-style.html\" title=\"CSS border-right-style \u5c5e\u6027\">border-right-style<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u53f3\u8fb9\u6846\u7684\u6837\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-right-width.html\" title=\"CSS border-right-width \u5c5e\u6027\">border-right-width<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u53f3\u8fb9\u6846\u7684\u5bbd\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-top.html\" title=\"CSS border-top \u5c5e\u6027\">border-top<\/a><\/td>\n<td>\u7b80\u5199\u5c5e\u6027\uff0c\u7528\u4e8e\u628a\u4e0a\u8fb9\u6846\u7684\u6240\u6709\u5c5e\u6027\u8bbe\u7f6e\u5230\u4e00\u4e2a\u58f0\u660e\u4e2d\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-top-color.html\" title=\"CSS border-top-color \u5c5e\u6027\">border-top-color<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u4e0a\u8fb9\u6846\u7684\u989c\u8272\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-top-style.html\" title=\"CSS border-top-style \u5c5e\u6027\">border-top-style<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u4e0a\u8fb9\u6846\u7684\u6837\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-border-top-width.html\" title=\"CSS border-top-width \u5c5e\u6027\">border-top-width<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u4e0a\u8fb9\u6846\u7684\u5bbd\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-border-radius.html\" title=\"CSS border-radius \u5c5e\u6027\">border-radius<\/a><\/td>\n<td>\u8bbe\u7f6e\u5706\u89d2\u7684\u8fb9\u6846\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u76d2\u5b50-\u8f6e\u5ed3Outline<\/h3>\n<p>\u7ed8\u5236\u4e8e\u5143\u7d20\u5468\u56f4\u7684\u4e00\u6761\u7ebf\uff0c\u4f4d\u4e8e\u8fb9\u6846\u8fb9\u7f18\u7684\u5916\u56f4\uff0c\u53ef\u8d77\u5230\u7a81\u51fa\u5143\u7d20\u7684\u4f5c\u7528\u3002<br \/>\n\u4e0d\u5360\u7a7a\u95f4<br \/>\n<img decoding=\"async\" src=\"https:\/\/levin.ink\/wp-content\/uploads\/2024\/04\/box_outline-1.gif\" alt=\"box_outline.gif\"><\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u5c5e\u6027<\/th>\n<th style=\"text-align:left\">\u8bf4\u660e<\/th>\n<th style=\"text-align:left\">\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-outline.html\">outline<\/a><\/td>\n<td style=\"text-align:left\">\u5728\u4e00\u4e2a\u58f0\u660e\u4e2d\u8bbe\u7f6e\u6240\u6709\u7684\u8f6e\u5ed3\u5c5e\u6027<\/td>\n<td style=\"text-align:left\">outline-color  &lt;br&gt;outline-style  &lt;br&gt;outline-width  &lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-outline-color.html\">outline-color<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u8f6e\u5ed3\u7684\u989c\u8272<\/td>\n<td style=\"text-align:left\">color-name  &lt;br&gt;hex-number  &lt;br&gt;rgb-number  &lt;br&gt;invert  &lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-outline-style.html\">outline-style<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u8f6e\u5ed3\u7684\u6837\u5f0f<\/td>\n<td style=\"text-align:left\">none  &lt;br&gt;dotted  &lt;br&gt;dashed  &lt;br&gt;solid  &lt;br&gt;double  &lt;br&gt;groove  &lt;br&gt;ridge  &lt;br&gt;inset  &lt;br&gt;outset  &lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-outline-width.html\">outline-width<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u8f6e\u5ed3\u7684\u5bbd\u5ea6<\/td>\n<td style=\"text-align:left\">thin  &lt;br&gt;medium  &lt;br&gt;thick  &lt;br&gt;length  &lt;br&gt;inherit<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u76d2\u5b50-\u5916\u8fb9\u8dddMargin<\/h3>\n<p>margin\u6e05\u9664\u5468\u56f4\u7684\uff08\u5916\u8fb9\u6846\uff09\u5143\u7d20\u533a\u57df\u3002margin \u6ca1\u6709\u80cc\u666f\u989c\u8272\uff0c\u662f\u5b8c\u5168\u900f\u660e\u7684\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-margin.html\" title=\"CSS margin \u5c5e\u6027\">margin<\/a><\/td>\n<td>\u7b80\u5199\u5c5e\u6027\u3002\u5728\u4e00\u4e2a\u58f0\u660e\u4e2d\u8bbe\u7f6e\u6240\u6709\u5916\u8fb9\u8ddd\u5c5e\u6027\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-margin-bottom.html\" title=\"CSS margin-bottom \u5c5e\u6027\">margin-bottom<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u4e0b\u5916\u8fb9\u8ddd\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-margin-left.html\" title=\"CSS margin-left \u5c5e\u6027\">margin-left<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u5de6\u5916\u8fb9\u8ddd\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-margin-right.html\" title=\"CSS margin-right \u5c5e\u6027\">margin-right<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u53f3\u5916\u8fb9\u8ddd\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-margin-top.html\" title=\"CSS margin-top \u5c5e\u6027\">margin-top<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u4e0a\u5916\u8fb9\u8ddd\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u76d2\u5b50-\u586b\u5145Padding<\/h3>\n<p>\u5b9a\u4e49\u5143\u7d20\u8fb9\u6846\u4e0e\u5143\u7d20\u5185\u5bb9\u4e4b\u95f4\u7684\u7a7a\u95f4\uff0c\u5373\u4e0a\u4e0b\u5de6\u53f3\u7684\u5185\u8fb9\u8ddd\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u5c5e\u6027<\/th>\n<th style=\"text-align:left\">\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-padding.html\">padding<\/a><\/td>\n<td style=\"text-align:left\">\u4f7f\u7528\u7b80\u5199\u5c5e\u6027\u8bbe\u7f6e\u5728\u4e00\u4e2a\u58f0\u660e\u4e2d\u7684\u6240\u6709\u586b\u5145\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-padding-bottom.html\">padding-bottom<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5143\u7d20\u7684\u5e95\u90e8\u586b\u5145<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-padding-left.html\">padding-left<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5143\u7d20\u7684\u5de6\u90e8\u586b\u5145<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-padding-right.html\">padding-right<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5143\u7d20\u7684\u53f3\u90e8\u586b\u5145<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-padding-top.html\">padding-top<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5143\u7d20\u7684\u9876\u90e8\u586b\u5145<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u76d2\u5b50-\u5c3a\u5bf8Dimension<\/h3>\n<p>\u63a7\u5236\u5143\u7d20\u7684\u9ad8\u5ea6\u548c\u5bbd\u5ea6\uff0c\u6216\u8005\u589e\u52a0\u884c\u95f4\u8ddd\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-dim-height.html\">height<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u9ad8\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-dim-line-height.html\">line-height<\/a><\/td>\n<td>\u8bbe\u7f6e\u884c\u9ad8\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-dim-max-height.html\">max-height<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u6700\u5927\u9ad8\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-dim-max-width.html\">max-width<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u6700\u5927\u5bbd\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-dim-min-height.html\">min-height<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u6700\u5c0f\u9ad8\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-dim-min-width.html\">min-width<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u6700\u5c0f\u5bbd\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/pr-dim-width.html\">width<\/a><\/td>\n<td>\u8bbe\u7f6e\u5143\u7d20\u7684\u5bbd\u5ea6\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u76d2\u5b50-\u663e\u793aDisplay<\/h3>\n<p>display:none\u5b8c\u5168\u9690\u85cf\u4e00\u4e2a\u5143\u7d20\uff0c\u4e0d\u5360\u7528\u4efb\u4f55\u7a7a\u95f4<br \/>\n\u5757\u548c\u5185\u8054\u5143\u7d20\uff1a[[First floor - 1 HTML#\u533a\u5757div\/span]]<br \/>\ndisplay:block\/inline\u6539\u53d8\u5143\u7d20\u663e\u793a\u65b9\u5f0f<\/p>\n<h3>\u76d2\u5b50-\u53ef\u89c1\u6027Visibility<\/h3>\n<p>visibility:hidden\u53ea\u662f\u770b\u4e0d\u89c1\u5185\u5bb9\uff0c\u4f9d\u65e7\u5360\u7528\u539f\u672c\u7684\u7a7a\u95f4<\/p>\n<h3>\u76d2\u5b50-\u5b9a\u4f4dPosition<\/h3>\n<p>position\u7684\u4e94\u4e2a\u503c<\/p>\n<ul>\n<li><a href=\"https:\/\/www.runoob.com\/css\/css-positioning.html#position-static\">static<\/a><\/li>\n<li><a href=\"https:\/\/www.runoob.com\/css\/css-positioning.html#position-relative\">relative<\/a><\/li>\n<li><a href=\"https:\/\/www.runoob.com\/css\/css-positioning.html#position-fixed\">fixed<\/a><\/li>\n<li><a href=\"https:\/\/www.runoob.com\/css\/css-positioning.html#position-absolute\">absolute<\/a><\/li>\n<li><a href=\"https:\/\/www.runoob.com\/css\/css-positioning.html#position-sticky\">sticky<\/a><\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u5c5e\u6027<\/th>\n<th style=\"text-align:left\">\u8bf4\u660e<\/th>\n<th style=\"text-align:left\">\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-pos-bottom.html\">bottom<\/a><\/td>\n<td style=\"text-align:left\">\u5b9a\u4f4d\u5143\u7d20\u4e0b\u5916\u8fb9\u8ddd\u8fb9\u754c\u4e0e\u5176\u5305\u542b\u5757\u4e0b\u8fb9\u754c\u4e4b\u95f4\u7684\u504f\u79fb\u3002<\/td>\n<td style=\"text-align:left\">auto&lt;br&gt;length&lt;br&gt;%&lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-pos-clip.html\">clip<\/a><\/td>\n<td style=\"text-align:left\">\u526a\u8f91\u4e00\u4e2a\u7edd\u5bf9\u5b9a\u4f4d\u7684\u5143\u7d20<\/td>\n<td style=\"text-align:left\">shape&lt;br&gt;auto&lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-class-cursor.html\">cursor<\/a><\/td>\n<td style=\"text-align:left\">\u663e\u793a\u5149\u6807\u79fb\u52a8\u5230\u6307\u5b9a\u7684\u7c7b\u578b<\/td>\n<td style=\"text-align:left\">url&lt;br&gt;auto&lt;br&gt;crosshair&lt;br&gt;default&lt;br&gt;pointer&lt;br&gt;move&lt;br&gt;e-resize&lt;br&gt;ne-resize&lt;br&gt;nw-resize&lt;br&gt;n-resize&lt;br&gt;se-resize&lt;br&gt;sw-resize&lt;br&gt;s-resize&lt;br&gt;w-resize&lt;br&gt;text&lt;br&gt;wait&lt;br&gt;help<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-pos-left.html\">left<\/a><\/td>\n<td style=\"text-align:left\">\u5b9a\u4f4d\u5143\u7d20\u5de6\u5916\u8fb9\u8ddd\u8fb9\u754c\u4e0e\u5176\u5305\u542b\u5757\u5de6\u8fb9\u754c\u4e4b\u95f4\u7684\u504f\u79fb\u3002<\/td>\n<td style=\"text-align:left\">auto&lt;br&gt;length&lt;br&gt;%&lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-pos-overflow.html\">overflow<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5f53\u5143\u7d20\u7684\u5185\u5bb9\u6ea2\u51fa\u5176\u533a\u57df\u65f6\u53d1\u751f\u7684\u4e8b\u60c5\u3002<\/td>\n<td style=\"text-align:left\">auto&lt;br&gt;hidden&lt;br&gt;scroll&lt;br&gt;visible&lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/css\/cssref\/css3-pr-overflow-y.html\">overflow-y<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u5982\u4f55\u5904\u7406\u9876\u90e8\/\u5e95\u90e8\u8fb9\u7f18\u7684\u5185\u5bb9\u6ea2\u51fa\u5143\u7d20\u7684\u5185\u5bb9\u533a\u57df<\/td>\n<td style=\"text-align:left\">auto&lt;br&gt;hidden&lt;br&gt;scroll&lt;br&gt;visible&lt;br&gt;no-display&lt;br&gt;no-content<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/css\/cssref\/\/cssref\/css3-pr-overflow-x.html\">overflow-x<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u5982\u4f55\u5904\u7406\u53f3\u8fb9\/\u5de6\u8fb9\u8fb9\u7f18\u7684\u5185\u5bb9\u6ea2\u51fa\u5143\u7d20\u7684\u5185\u5bb9\u533a\u57df<\/td>\n<td style=\"text-align:left\">auto&lt;br&gt;hidden&lt;br&gt;scroll&lt;br&gt;visible&lt;br&gt;no-display&lt;br&gt;no-content<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-class-position.html\">position<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u5143\u7d20\u7684\u5b9a\u4f4d\u7c7b\u578b<\/td>\n<td style=\"text-align:left\">absolute &lt;br&gt;fixed&lt;br&gt;relative&lt;br&gt;static&lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-pos-right.html\">right<\/a><\/td>\n<td style=\"text-align:left\">\u5b9a\u4f4d\u5143\u7d20\u53f3\u5916\u8fb9\u8ddd\u8fb9\u754c\u4e0e\u5176\u5305\u542b\u5757\u53f3\u8fb9\u754c\u4e4b\u95f4\u7684\u504f\u79fb\u3002<\/td>\n<td style=\"text-align:left\">auto&lt;br&gt;length&lt;br&gt;%&lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-pos-top.html\">top<\/a><\/td>\n<td style=\"text-align:left\">\u4e00\u4e2a\u5b9a\u4f4d\u5143\u7d20\u7684\u4e0a\u5916\u8fb9\u8ddd\u8fb9\u754c\u4e0e\u5176\u5305\u542b\u5757\u4e0a\u8fb9\u754c\u4e4b\u95f4\u7684\u504f\u79fb\u3002<\/td>\n<td style=\"text-align:left\">auto&lt;br&gt;length&lt;br&gt;%&lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-pos-z-index.html\">z-index<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u5143\u7d20\u7684\u5806\u53e0\u987a\u5e8f<\/td>\n<td style=\"text-align:left\">number&lt;br&gt;auto&lt;br&gt;inherit<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>static<\/h4>\n<p>\u9ed8\u8ba4\u503c\uff0c\u65e0\u5b9a\u4f4d<br \/>\n\u4e0d\u4f1a\u53d7\u5230top\uff0cbottom\uff0cleft\uff0cright\u5f71\u54cd\u3002<\/p>\n<h4>fixed<\/h4>\n<p>\u5143\u7d20\u7684\u4f4d\u7f6e\u76f8\u5bf9\u4e8e\u6d4f\u89c8\u5668\u7a97\u53e3\u56fa\u5b9a\u3002<br \/>\n\u5373\u4f7f\u7a97\u53e3\u6eda\u52a8\u4e5f\u4e0d\u4f1a\u79fb\u52a8\u3002<\/p>\n<blockquote>\n<p><strong>\u6ce8\u610f\uff1a<\/strong>\u00a0Fixed \u5b9a\u4f4d\u5728 IE7 \u548c IE8 \u4e0b\u9700\u8981\u63cf\u8ff0 !DOCTYPE \u624d\u80fd\u652f\u6301\u3002<br \/>\nFixed\u5b9a\u4f4d\u4f7f\u5143\u7d20\u7684\u4f4d\u7f6e\u4e0e\u6587\u6863\u6d41\u65e0\u5173\uff0c\u56e0\u6b64\u4e0d\u5360\u636e\u7a7a\u95f4\u3002<br \/>\nFixed\u5b9a\u4f4d\u7684\u5143\u7d20\u548c\u5176\u4ed6\u5143\u7d20\u91cd\u53e0\u3002<\/p>\n<\/blockquote>\n<h4>relative<\/h4>\n<p>\u76f8\u5bf9\u4e8e\u5176\u6b63\u5e38\u4f4d\u7f6e\u7684\u5b9a\u4f4d\uff08\u504f\u79fb\uff09\u3002<br \/>\n\u504f\u79fb\u540e\uff0c\u5176\u539f\u672c\u6b63\u5e38\u4f4d\u7f6e\u7684\u7a7a\u95f4\u4f9d\u65e7\u5b58\u5728\u3002<br \/>\n\u76f8\u5bf9\u5b9a\u4f4d\u5143\u7d20\u7ecf\u5e38\u88ab\u7528\u6765\u4f5c\u4e3a\u7edd\u5bf9\u5b9a\u4f4d\u5143\u7d20\u7684\u5bb9\u5668\u5757\u3002<\/p>\n<h4>absolute<\/h4>\n<p>\u7edd\u5bf9\u5b9a\u4f4d\u7684\u5143\u7d20\u7684\u4f4d\u7f6e\u76f8\u5bf9\u4e8e\u6700\u8fd1\u7684\u5df2\u5b9a\u4f4d\u7236\u5143\u7d20\uff0c\u5982\u679c\u5143\u7d20\u6ca1\u6709\u5df2\u5b9a\u4f4d\u7684\u7236\u5143\u7d20\uff0c\u90a3\u4e48\u5b83\u7684\u4f4d\u7f6e\u76f8\u5bf9\u4e8e&lt;html&gt;\u3002<br \/>\n\u5143\u7d20\u4f4d\u7f6e\u4e8e\u6587\u6863\u6d41\u65e0\u5173\uff0c\u4e0d\u5360\u7528\u7a7a\u95f4\uff0c\u4e0e\u5176\u4ed6\u5143\u7d20\u91cd\u53e0\u3002<\/p>\n<h4>sticky<\/h4>\n<p>\u7c98\u8d34\u5b9a\u4f4d\u6839\u636e\u7528\u6237\u7684\u6eda\u52a8\u5728relative\u548cfixed\u5b9a\u4f4d\u4e4b\u95f4\u5207\u6362\u3002<br \/>\n\u6b63\u5e38\u4e3aposition:relative\u800c\u5f53\u9875\u9762\u6eda\u52a8\u8d85\u51fa\u76ee\u6807\u533a\u57df\u65f6\uff0c\u5b83\u7684\u8868\u73b0\u5c31\u50cfposition:fixed\uff0c\u5b83\u4f1a\u56fa\u5b9a\u5728\u76ee\u6807\u4f4d\u7f6e\u3002<br \/>\n\u5fc5\u987b\u6307\u5b9atop,right,bottom\u6216left\u56db\u4e2a\u9608\u503c\u5176\u4e2d\u4e4b\u4e00\u624d\u751f\u6548\u3002<\/p>\n<h4>\u91cd\u53e0\u6b21\u5e8f<\/h4>\n<p>z-index\u5c5e\u6027\uff0c\u5177\u6709\u66f4\u9ad8\u5806\u53e0\u987a\u5e8f\u7684\u5143\u7d20\u603b\u662f\u5728\u8f83\u4f4e\u7684\u5806\u53e0\u987a\u5e8f\u5143\u7d20\u7684\u524d\u9762\u3002<\/p>\n<blockquote>\n<p>\u5982\u679c\u4e24\u4e2a\u5b9a\u4f4d\u5143\u7d20\u91cd\u53e0\uff0c\u6ca1\u6709\u6307\u5b9az - index\uff0c\u6700\u540e\u5b9a\u4f4d\u5728HTML\u4ee3\u7801\u4e2d\u7684\u5143\u7d20\u5c06\u88ab\u663e\u793a\u5728\u6700\u524d\u9762\u3002<\/p>\n<\/blockquote>\n<h3>\u76d2\u5b50-\u5e03\u5c40Overflow<\/h3>\n<p>overflow \u5c5e\u6027\u53ef\u4ee5\u63a7\u5236\u5185\u5bb9\u6ea2\u51fa\u5143\u7d20\u6846\u65f6\u5728\u5bf9\u5e94\u7684\u5143\u7d20\u533a\u95f4\u5185\u6dfb\u52a0\u6eda\u52a8\u6761\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u503c<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>visible<\/td>\n<td>\u9ed8\u8ba4\u503c\u3002\u5185\u5bb9\u4e0d\u4f1a\u88ab\u4fee\u526a\uff0c\u4f1a\u5448\u73b0\u5728\u5143\u7d20\u6846\u4e4b\u5916\u3002<\/td>\n<\/tr>\n<tr>\n<td>hidden<\/td>\n<td>\u5185\u5bb9\u4f1a\u88ab\u4fee\u526a\uff0c\u5e76\u4e14\u5176\u4f59\u5185\u5bb9\u662f\u4e0d\u53ef\u89c1\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td>scroll<\/td>\n<td>\u5185\u5bb9\u4f1a\u88ab\u4fee\u526a\uff0c\u4f46\u662f\u6d4f\u89c8\u5668\u4f1a\u663e\u793a\u6eda\u52a8\u6761\u4ee5\u4fbf\u67e5\u770b\u5176\u4f59\u7684\u5185\u5bb9\u3002<\/td>\n<\/tr>\n<tr>\n<td>auto<\/td>\n<td>\u5982\u679c\u5185\u5bb9\u88ab\u4fee\u526a\uff0c\u5219\u6d4f\u89c8\u5668\u4f1a\u663e\u793a\u6eda\u52a8\u6761\u4ee5\u4fbf\u67e5\u770b\u5176\u4f59\u7684\u5185\u5bb9\u3002<\/td>\n<\/tr>\n<tr>\n<td>inherit<\/td>\n<td>\u89c4\u5b9a\u5e94\u8be5\u4ece\u7236\u5143\u7d20\u7ee7\u627f overflow \u5c5e\u6027\u7684\u503c\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote>\n<p>overflow \u5c5e\u6027\u53ea\u5de5\u4f5c\u4e8e\u6307\u5b9a\u9ad8\u5ea6\u7684\u5757\u5143\u7d20\u4e0a\u3002<\/p>\n<\/blockquote>\n<h3>\u76d2\u5b50-\u6d6e\u52a8Float<\/h3>\n<p>\u4f7f\u5143\u7d20\u5411\u5de6\u6216\u5411\u53f3\u79fb\u52a8\uff0c\u5176\u5468\u56f4\u7684\u5143\u7d20\u4e5f\u4f1a\u91cd\u65b0\u6392\u5217\u3002<br \/>\n\u5f80\u5f80\u7528\u4e8e\u56fe\u50cf\uff0c\u4f46\u5b83\u5728\u5e03\u5c40\u65f6\u4e00\u6837\u975e\u5e38\u6709\u7528\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u5c5e\u6027<\/th>\n<th style=\"text-align:left\">\u63cf\u8ff0<\/th>\n<th style=\"text-align:left\">\u503c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-class-clear.html\">clear<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u4e0d\u5141\u8bb8\u5143\u7d20\u5468\u56f4\u6709\u6d6e\u52a8\u5143\u7d20\u3002<\/td>\n<td style=\"text-align:left\">left  &lt;br&gt;right  &lt;br&gt;both  &lt;br&gt;none  &lt;br&gt;inherit<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/pr-class-float.html\">float<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u4e00\u4e2a\u76d2\u5b50\uff08\u5143\u7d20\uff09\u662f\u5426\u53ef\u4ee5\u6d6e\u52a8\u3002<\/td>\n<td style=\"text-align:left\">left  &lt;br&gt;right  &lt;br&gt;none  &lt;br&gt;inherit<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u5982\u4f55\u6d6e\u52a8<\/h4>\n<p>\u5143\u7d20\u7684\u6c34\u5e73\u65b9\u5411\u6d6e\u52a8\uff0c\u610f\u5473\u7740\u5143\u7d20\u53ea\u80fd\u5de6\u53f3\u79fb\u52a8\u800c\u4e0d\u80fd\u4e0a\u4e0b\u79fb\u52a8\u3002<br \/>\n\u4e00\u4e2a\u6d6e\u52a8\u5143\u7d20\u4f1a\u5c3d\u91cf\u5411\u5de6\u6216\u5411\u53f3\u79fb\u52a8\uff0c\u76f4\u5230\u5b83\u7684\u5916\u8fb9\u7f18\u78b0\u5230\u5305\u542b\u6846\u6216\u53e6\u4e00\u4e2a\u6d6e\u52a8\u6846\u7684\u8fb9\u6846\u4e3a\u6b62\u3002<br \/>\n\u6d6e\u52a8\u5143\u7d20\u4e4b\u540e\u7684\u5143\u7d20\u5c06\u56f4\u7ed5\u5b83\u3002<br \/>\n\u6d6e\u52a8\u5143\u7d20\u4e4b\u524d\u7684\u5143\u7d20\u5c06\u4e0d\u4f1a\u53d7\u5230\u5f71\u54cd\u3002<\/p>\n<h4>\u76f8\u90bb\u6d6e\u52a8\u5143\u7d20<\/h4>\n<p>\u5982\u679c\u4f60\u628a\u51e0\u4e2a\u6d6e\u52a8\u7684\u5143\u7d20\u653e\u5230\u4e00\u8d77\uff0c\u5982\u679c\u6709\u7a7a\u95f4\u7684\u8bdd\uff0c\u5b83\u4eec\u5c06\u5f7c\u6b64\u76f8\u90bb\u3002<\/p>\n<h4>\u6e05\u9664\u6d6e\u52a8<\/h4>\n<p>\u5143\u7d20\u6d6e\u52a8\u4e4b\u540e\uff0c\u5468\u56f4\u7684\u5143\u7d20\u4f1a\u91cd\u65b0\u6392\u5217\uff0c\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u4f7f\u7528 clear \u5c5e\u6027\u3002<br \/>\nclear \u5c5e\u6027\u6307\u5b9a\u5143\u7d20\u4e24\u4fa7\u4e0d\u80fd\u51fa\u73b0\u6d6e\u52a8\u5143\u7d20\u3002<\/p>\n<h3>\u900f\u660e\u5ea6<\/h3>\n<p>rgba(r,g,b,a)<br \/>\nopacity 0-1<\/p>\n<h2>\u5e03\u5c40-\u5bf9\u9f50<\/h2>\n<h3>\u5143\u7d20\u5bf9\u9f50<\/h3>\n<h4>\u6c34\u5e73\u5c45\u4e2d\u5bf9\u9f50<\/h4>\n<pre><code class=\"language-css\">.center\n{ \n\tmargin: auto;\n\twidth: 50%;\n}\n<\/code><\/pre>\n<blockquote>\n<p>\u6ca1\u6709\u8bbe\u7f6ewidth\u5c5e\u6027\u6216\u8005\u8bbe\u7f6e\u4e3a100%\uff0c\u5c45\u4e2d\u5bf9\u9f50(margin: auto)\u5c06\u4e0d\u8d77\u4f5c\u7528\u3002<\/p>\n<\/blockquote>\n<h4>\u5de6\u53f3\u5bf9\u9f50<\/h4>\n<h5>\u4f7f\u7528position<\/h5>\n<pre><code class=\"language-css\">.right\n{\n\tposition: absolute;\n\tright: 0px;\n\twidth: 300px;\n}\n<\/code><\/pre>\n<blockquote>\n<p>\u7edd\u5bf9\u5b9a\u4f4d\u5143\u7d20\u4f1a\u88ab\u4ece\u6b63\u5e38\u6d41\u4e2d\u5220\u9664\uff0c\u5e76\u4e14\u80fd\u591f\u4ea4\u53e0\u5143\u7d20\u3002<br \/>\n\u5f53\u4f7f\u7528position\u6765\u5bf9\u9f50\u5143\u7d20\u65f6, \u901a\u5e38&lt;body&gt;\u5143\u7d20\u4f1a\u8bbe\u7f6emargin\u548cpadding\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728\u4e0d\u540c\u7684\u6d4f\u89c8\u5668\u4e2d\u51fa\u73b0\u53ef\u89c1\u7684\u5dee\u5f02\u3002<br \/>\n\u5f53\u4f7f\u7528position\u5c5e\u6027\u65f6\uff0c\u8bf7\u59cb\u7ec8\u8bbe\u7f6e!DOCTYPE\u58f0\u660e\u3002<\/p>\n<\/blockquote>\n<h5>\u4f7f\u7528float<\/h5>\n<pre><code class=\"language-css\">.right\n{\n\tfloat: right;\n\twidth: 300px;\n}\n<\/code><\/pre>\n<blockquote>\n<p>\u5f53\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f\u5bf9\u9f50\u5143\u7d20\u65f6\uff0c\u6700\u597d\u5bf9&lt;body&gt;\u5143\u7d20\u7684\u5916\u8fb9\u8ddd\u548c\u5185\u8fb9\u8ddd\u8fdb\u884c\u9884\u5b9a\u4e49\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728\u4e0d\u540c\u7684\u6d4f\u89c8\u5668\u4e2d\u51fa\u73b0\u53ef\u89c1\u7684\u5dee\u5f02\u3002<br \/>\n\u5982\u679c\u5b50\u5143\u7d20\u7684\u9ad8\u5ea6\u5927\u4e8e\u7236\u5143\u7d20\uff0c\u4e14\u5b50\u5143\u7d20\u8bbe\u7f6e\u4e86\u6d6e\u52a8\uff0c\u90a3\u4e48\u5b50\u5143\u7d20\u5c06\u6ea2\u51fa\uff0c\u8fd9\u65f6\u53ef\u4ee5\u4f7f\u7528&quot;clearfix(\u6e05\u9664\u6d6e\u52a8)&quot;\u6765\u89e3\u51b3\u8be5\u95ee\u9898\u3002<br \/>\n\u5728\u7236\u5143\u7d20\u4e0a\u6dfb\u52a0overflow: auto;\u6765\u89e3\u51b3\u5b50\u5143\u7d20\u6ea2\u51fa\u7684\u95ee\u9898\u3002<br \/>\n\u5f53\u4f7f\u7528float\u5c5e\u6027\u65f6\uff0c\u8bf7\u59cb\u7ec8\u8bbe\u7f6e!DOCTYPE\u58f0\u660e\u3002<\/p>\n<\/blockquote>\n<h4>\u5782\u76f4\u5c45\u4e2d<\/h4>\n<h5>\u4f7f\u7528padding<\/h5>\n<pre><code class=\"language-css\">.center\n{\n\tpadding: 70px 0;\n}\n<\/code><\/pre>\n<h5>\u4f7f\u7528line-height<\/h5>\n<pre><code class=\"language-css\">.center\n{\n\tline-height: 200px;\n\theight: 200px;\n}\n\/*\u6587\u672c\u591a\u884c*\/\n.center p\n{\n\tline-height: 1.5;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n}\n<\/code><\/pre>\n<h5>\u4f7f\u7528position\u548ctransform<\/h5>\n<pre><code class=\"language-css\">.center\n{\n\theight: 200px;\n\tposition: relative;\n}\n\n.center p\n{\n\tmargin: 0;\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n<\/code><\/pre>\n<h3>\u6587\u672c\u6c34\u5e73\u5c45\u4e2d\u5bf9\u9f50<\/h3>\n<pre><code class=\"language-css\">.center\n{\n\ttext-align: center;\n}\n<\/code><\/pre>\n<h3>\u56fe\u7247\u6c34\u5e73\u5c45\u4e2d\u5bf9\u9f50<\/h3>\n<pre><code class=\"language-css\">img\n{\n\tdisplay: block;\n\tmargin: auto;\n\twidth: 40%;\n}\n<\/code><\/pre>\n<h2>\u4f2a\u7c7b<\/h2>\n<p>\u4e3a\u5143\u7d20\u6dfb\u52a0\u4e00\u4e9b\u9009\u62e9\u5668\u7684\u7279\u6b8a\u6548\u679c\u3002\u6309\u7167\u6b63\u5e38\u7684css\u770b\uff0c\u4f2a\u7c7b\u4fee\u9970\u524d\u9762\u7684\u5143\u7d20<\/p>\n<h3>\u8bed\u6cd5<\/h3>\n<p>\u5185\u8054\uff1a<br \/>\nselector:pseudo-class {property:value;}<br \/>\nCSS\uff1a<br \/>\nselector.class:pseudo-class {property:value;}<\/p>\n<h3>anchor\u4f2a\u7c7b<\/h3>\n<pre><code class=\"language-css\">\/*\u672a\u8bbf\u95ee\u7684link*\/\na:link {...}\n\/*\u5df2\u8bbf\u95ee\u7684link*\/\na:visited {...}\n\/*\u9f20\u6807\u60ac\u505c\u7684link*\/\na:hover {...}\n\/*\u5df2\u9009\u4e2d\uff08\u9f20\u6807\u70b9\u51fb\u540e\uff09\u7684link*\/\na:active {...}\n<\/code><\/pre>\n<blockquote>\n<p>\u5728CSS\u5b9a\u4e49\u4e2d\uff0ca:hover \u5fc5\u987b\u88ab\u7f6e\u4e8e a:link \u548c a:visited \u4e4b\u540e\uff0c\u624d\u6709\u6548\u3002<br \/>\na:active \u5fc5\u987b\u88ab\u7f6e\u4e8e a:hover \u4e4b\u540e\uff0c\u624d\u6709\u6548\u3002<br \/>\n\u4f2a\u7c7b\u7684\u540d\u79f0\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u3002<\/p>\n<\/blockquote>\n<h3>\u4f2a\u7c7b\u4e0eCSS\u7c7b<\/h3>\n<p>css\u7684\u9009\u62e9\u5668\u8bed\u6cd5\u53ef\u642d\u914d\u4f2a\u7c7b\u4f7f\u7528<\/p>\n<pre><code class=\"language-css\">a.red:visited\n{\n\tcolor:#FF0000;\n}\n\n&lt;a class=&quot;red&quot; herf=&quot;&quot;&gt;&lt;\/a&gt;\n<\/code><\/pre>\n<h3>\u4f2a\u7c7b first-child<\/h3>\n<p>\u9009\u62e9\u7236\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20<\/p>\n<pre><code class=\"language-css\">\/*\u9009\u62e9\u4efb\u610f\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20\u7684p\u5143\u7d20*\/\np:first-child\n{\n\tcolor:blue;\n}\n<\/code><\/pre>\n<pre><code class=\"language-css\">\/*\u9009\u62e9\u4efb\u610fp\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20\u7684i\u5143\u7d20*\/\np &gt; i:first-child\n{\n\tcolor:blue;\n}\n<\/code><\/pre>\n<pre><code class=\"language-css\">\/*\u9009\u62e9\u4f5c\u4e3a\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20\u7684p\u5143\u7d20\u4e2d\u7684\u6240\u6709i\u5143\u7d20*\/\np:first-child i\n{\n\tcolor:blue;\n}\n<\/code><\/pre>\n<h3>\u4f2a\u7c7b lang<\/h3>\n<p>\u4e3a\u4e0d\u540c\u7684\u8bed\u8a00\u5b9a\u4e49\u7279\u6b8a\u7684\u89c4\u5219<\/p>\n<pre><code class=\"language-css\">q:lang(no)\n{\n\tquotes: &quot;~&quot; &quot;~&quot;;\n}\nq:lang(yes)\n{\n\tquotes: ;\n}\n<\/code><\/pre>\n<pre><code class=\"language-html\">&lt;!-- nnnn\u5c06\u4f1a\u88ab~\u5f15\u8d77\u6765\uff0cyyyy\u5c06\u4f1a\u88ab&quot;\u5f15\u8d77\u6765 --&gt;\n&lt;p&gt;xxxx&lt;q lang=&quot;no&quot;&gt;nnnn&lt;\/q&gt;xxxx&lt;q lang=&quot;yes&quot;&gt;yyyy&lt;\/q&gt;&lt;\/p&gt;\n<\/code><\/pre>\n<h3>\u4f2a\u7c7b\u53ca\u4f2a\u5143\u7d20 \u5176\u4ed6<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u9009\u62e9\u5668<\/th>\n<th style=\"text-align:left\">\u793a\u4f8b<\/th>\n<th style=\"text-align:left\">\u793a\u4f8b\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-checked.html\">:checked<\/a><\/td>\n<td style=\"text-align:left\">input:checked<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709\u9009\u4e2d\u7684\u8868\u5355\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/css\/cssref\/sel-disabled.html\">:disabled<\/a><\/td>\n<td style=\"text-align:left\">input:disabled<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709\u7981\u7528\u7684\u8868\u5355\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-empty.html\">:empty<\/a><\/td>\n<td style=\"text-align:left\">p:empty<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709\u6ca1\u6709\u5b50\u5143\u7d20\u7684p\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-enable.html\">:enabled<\/a><\/td>\n<td style=\"text-align:left\">input:enabled<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709\u542f\u7528\u7684\u8868\u5355\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-first-of-type.html\">:first-of-type<\/a><\/td>\n<td style=\"text-align:left\">p:first-of-type<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u7684\u6bcf\u4e2a p \u5143\u7d20\u662f\u5176\u7236\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a p \u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-in-range.html\">:in-range<\/a><\/td>\n<td style=\"text-align:left\">input:in-range<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u5143\u7d20\u6307\u5b9a\u8303\u56f4\u5185\u7684\u503c<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-invalid.html\">:invalid<\/a><\/td>\n<td style=\"text-align:left\">input:invalid<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709\u65e0\u6548\u7684\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-last-child.html\">:last-child<\/a><\/td>\n<td style=\"text-align:left\">p:last-child<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709p\u5143\u7d20\u7684\u6700\u540e\u4e00\u4e2a\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-last-of-type.html\">:last-of-type<\/a><\/td>\n<td style=\"text-align:left\">p:last-of-type<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6bcf\u4e2ap\u5143\u7d20\u662f\u5176\u6bcd\u5143\u7d20\u7684\u6700\u540e\u4e00\u4e2ap\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-not.html\">:not(selector)<\/a><\/td>\n<td style=\"text-align:left\">:not(p)<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709p\u4ee5\u5916\u7684\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-nth-child.html\">:nth-child(n)<\/a><\/td>\n<td style=\"text-align:left\">p:nth-child(2)<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709 p \u5143\u7d20\u7684\u7236\u5143\u7d20\u7684\u7b2c\u4e8c\u4e2a\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-nth-last-child.html\">:nth-last-child(n)<\/a><\/td>\n<td style=\"text-align:left\">p:nth-last-child(2)<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709p\u5143\u7d20\u5012\u6570\u7684\u7b2c\u4e8c\u4e2a\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-nth-last-of-type.html\">:nth-last-of-type(n)<\/a><\/td>\n<td style=\"text-align:left\">p:nth-last-of-type(2)<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709p\u5143\u7d20\u5012\u6570\u7684\u7b2c\u4e8c\u4e2a\u4e3ap\u7684\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-nth-of-type.html\">:nth-of-type(n)<\/a><\/td>\n<td style=\"text-align:left\">p:nth-of-type(2)<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709p\u5143\u7d20\u7b2c\u4e8c\u4e2a\u4e3ap\u7684\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-only-of-type.html\">:only-of-type<\/a><\/td>\n<td style=\"text-align:left\">p:only-of-type<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709\u4ec5\u6709\u4e00\u4e2a\u5b50\u5143\u7d20\u4e3ap\u7684\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-only-child.html\">:only-child<\/a><\/td>\n<td style=\"text-align:left\">p:only-child<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709\u4ec5\u6709\u4e00\u4e2a\u5b50\u5143\u7d20\u7684p\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-optional.html\">:optional<\/a><\/td>\n<td style=\"text-align:left\">input:optional<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6ca1\u6709&quot;required&quot;\u7684\u5143\u7d20\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-out-of-range.html\">:out-of-range<\/a><\/td>\n<td style=\"text-align:left\">input:out-of-range<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6307\u5b9a\u8303\u56f4\u4ee5\u5916\u7684\u503c\u7684\u5143\u7d20\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-read-only.html\">:read-only<\/a><\/td>\n<td style=\"text-align:left\">input:read-only<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u53ea\u8bfb\u5c5e\u6027\u7684\u5143\u7d20\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-read-write.html\">:read-write<\/a><\/td>\n<td style=\"text-align:left\">input:read-write<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6ca1\u6709\u53ea\u8bfb\u5c5e\u6027\u7684\u5143\u7d20\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-required.html\">:required<\/a><\/td>\n<td style=\"text-align:left\">input:required<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6709&quot;required&quot;\u5c5e\u6027\u6307\u5b9a\u7684\u5143\u7d20\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-root.html\">:root<\/a><\/td>\n<td style=\"text-align:left\">root<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6587\u6863\u7684\u6839\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-target.html\">:target<\/a><\/td>\n<td style=\"text-align:left\">#news:target<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u5f53\u524d\u6d3b\u52a8#news\u5143\u7d20(\u70b9\u51fbURL\u5305\u542b\u951a\u7684\u540d\u5b57)<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-valid.html\">:valid<\/a><\/td>\n<td style=\"text-align:left\">input:valid<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709\u6709\u6548\u503c\u7684\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-link.html\">:link<\/a><\/td>\n<td style=\"text-align:left\">a:link<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709\u672a\u8bbf\u95ee\u94fe\u63a5<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-visited.html\">:visited<\/a><\/td>\n<td style=\"text-align:left\">a:visited<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6240\u6709\u8bbf\u95ee\u8fc7\u7684\u94fe\u63a5<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-active.html\">:active<\/a><\/td>\n<td style=\"text-align:left\">a:active<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6b63\u5728\u6d3b\u52a8\u94fe\u63a5<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-hover.html\">:hover<\/a><\/td>\n<td style=\"text-align:left\">a:hover<\/td>\n<td style=\"text-align:left\">\u628a\u9f20\u6807\u653e\u5728\u94fe\u63a5\u4e0a\u7684\u72b6\u6001<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-focus.html\">:focus<\/a><\/td>\n<td style=\"text-align:left\">input:focus<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u5143\u7d20\u8f93\u5165\u540e\u5177\u6709\u7126\u70b9<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-firstletter.html\">::first-letter<\/a><\/td>\n<td style=\"text-align:left\">p::first-letter<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6bcf\u4e2a&lt;p&gt; \u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b57\u6bcd<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-firstline.html\">::first-line<\/a><\/td>\n<td style=\"text-align:left\">p::first-line<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u6bcf\u4e2a&lt;p&gt; \u5143\u7d20\u7684\u7b2c\u4e00\u884c<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-firstchild.html\">:first-child<\/a><\/td>\n<td style=\"text-align:left\">p:first-child<\/td>\n<td style=\"text-align:left\">\u9009\u62e9\u5668\u5339\u914d\u5c5e\u4e8e\u4efb\u610f\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20\u7684 &lt;p&gt; \u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-before.html\">::before<\/a><\/td>\n<td style=\"text-align:left\">p::before<\/td>\n<td style=\"text-align:left\">\u5728\u6bcf\u4e2a&lt;p&gt;\u5143\u7d20\u4e4b\u524d\u63d2\u5165\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-after.html\">::after<\/a><\/td>\n<td style=\"text-align:left\">p::after<\/td>\n<td style=\"text-align:left\">\u5728\u6bcf\u4e2a&lt;p&gt;\u5143\u7d20\u4e4b\u540e\u63d2\u5165\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/sel-lang.html\">:lang(<em>language<\/em>)<\/a><\/td>\n<td style=\"text-align:left\">p:lang(it)<\/td>\n<td style=\"text-align:left\">\u4e3a&lt;p&gt;\u5143\u7d20\u7684lang\u5c5e\u6027\u9009\u62e9\u4e00\u4e2a\u5f00\u59cb\u503c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u4f2a\u5143\u7d20<\/h2>\n<h3>\u4f2a\u7c7b\u4e0e\u4f2a\u5143\u7d20\u533a\u522b<\/h3>\n<p>\u4f2a\u7c7b\u662f\u9009\u62e9\u5668\u7684\u4e00\u79cd\uff0c\u7528\u4e8e\u9009\u62e9\u5904\u4e8e\u7279\u5b9a\u72b6\u6001\u7684\u5143\u7d20\uff0c\u6bd4\u5982\u5f53\u5b83\u4eec\u662f\u8fd9\u4e00\u7c7b\u578b\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20\u65f6\uff0c\u6216\u8005\u662f\u5f53\u9f20\u6807\u6307\u9488\u60ac\u6d6e\u5728\u5143\u7d20\u4e0a\u9762\u7684\u65f6\u5019\u3002\u4f8b\u5982\uff0c:hover\u4f2a\u7c7b\u53ef\u4ee5\u7528\u6765\u63cf\u8ff0\u7528\u6237\u60ac\u505c\u5728\u5143\u7d20\u4e0a\u65f6\u7684\u72b6\u6001\u3002<br \/>\n\u4f2a\u5143\u7d20\u5219\u7528\u4e8e\u521b\u5efa\u4e00\u4e9b\u4e0d\u5728DOM\u6811\u4e2d\u7684\u5143\u7d20\uff0c\u5e76\u4e3a\u5176\u6dfb\u52a0\u6837\u5f0f\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7::before\u6765\u5728\u4e00\u4e2a\u5143\u7d20\u4e4b\u524d\u6dfb\u52a0\u4e00\u4e9b\u6587\u672c\uff0c\u5e76\u4e3a\u8fd9\u4e9b\u6587\u672c\u6dfb\u52a0\u6837\u5f0f\u3002<br \/>\n\u603b\u7684\u6765\u8bf4\uff0c\u4f2a\u7c7b\u7684\u64cd\u4f5c\u5bf9\u8c61\u662f\u6587\u6863\u6811\u4e2d\u5df2\u6709\u7684\u5143\u7d20\uff0c\u800c\u4f2a\u5143\u7d20\u5219\u521b\u5efa\u4e86\u4e00\u4e2a\u6587\u6863\u6811\u5916\u7684\u5143\u7d20\u3002\u56e0\u6b64\uff0c\u4f2a\u7c7b\u4e0e\u4f2a\u5143\u7d20\u7684\u533a\u522b\u5728\u4e8e\uff1a\u6709\u6ca1\u6709\u521b\u5efa\u4e00\u4e2a\u6587\u6863\u6811\u4e4b\u5916\u7684\u5143\u7d20\u3002<br \/>\n\u5728CSS3\u89c4\u8303\u4e2d\uff0c\u4f2a\u5143\u7d20\u4f7f\u7528\u53cc\u5192\u53f7\uff08::\uff09\u8868\u793a\uff0c\u4ee5\u6b64\u6765\u533a\u5206\u4f2a\u7c7b\u548c\u4f2a\u5143\u7d20\u3002\u4f8b\u5982\uff0c::before\u548c::after\u7b49\u4f2a\u5143\u7d20\u4f7f\u7528\u53cc\u5192\u53f7\uff08::\uff09\uff0c:hover\u548c:active\u4f2a\u7c7b\u4f7f\u7528\u5355\u5192\u53f7\uff08:\uff09\u3002\u4f46\u662f\uff0c\u9664\u4e86\u5c11\u90e8\u5206\u4f2a\u5143\u7d20\u5982::backdrop\u5fc5\u987b\u4f7f\u7528\u53cc\u5192\u53f7\uff08::\uff09\uff0c\u5927\u90e8\u5206\u4f2a\u5143\u7d20\u90fd\u652f\u6301\u5355\u5192\u53f7\u548c\u53cc\u5192\u53f7\u7684\u5199\u6cd5\u3002<\/p>\n<h3>\u4f2a\u5143\u7d20 first-line<\/h3>\n<p>\u4e3a\u6587\u672c\u7684\u9996\u884c\u8bbe\u7f6e\u7279\u6b8a\u6837\u5f0f<\/p>\n<pre><code class=\"language-css\">p::first-line\n{\n\tcolor:#FF0000;\n\tfont-variant:small-caps;\n}\n<\/code><\/pre>\n<blockquote>\n<p>first-line\u53ea\u80fd\u7528\u4e8e\u5757\u7ea7\u5143\u7d20<br \/>\n\u4e0b\u9762\u7684\u5c5e\u6027\u53ef\u7528\u4e8efirst-line<br \/>\nfont properties<br \/>\ncolor properties\u00a0<br \/>\nbackground properties<br \/>\nword-spacing<br \/>\nletter-spacing<br \/>\ntext-decoration<br \/>\nvertical-align<br \/>\ntext-transform<br \/>\nline-height<br \/>\nclear<\/p>\n<\/blockquote>\n<h3>\u4f2a\u5143\u7d20 first-letter<\/h3>\n<p>\u8bbe\u7f6e\u9996\u5b57\u6bcd\u7684\u7279\u6b8a\u6837\u5f0f<\/p>\n<pre><code class=\"language-css\">p:first-letter\n{\n\tcolor:#FF0000;\n\tfont-size:xx-large;\n}\n<\/code><\/pre>\n<blockquote>\n<p>first-letter\u53ea\u80fd\u7528\u4e8e\u5757\u7ea7\u5143\u7d20\u3002<br \/>\n\u4e0b\u9762\u7684\u5c5e\u6027\u53ef\u5e94\u7528\u4e8efirst-letter<br \/>\nfont properties<br \/>\ncolor properties\u00a0<br \/>\nbackground properties<br \/>\nmargin properties<br \/>\npadding properties<br \/>\nborder properties<br \/>\ntext-decoration<br \/>\nvertical-align (only if &quot;float&quot; is &quot;none&quot;)<br \/>\ntext-transform<br \/>\nline-height<br \/>\nfloat<br \/>\nclear<\/p>\n<\/blockquote>\n<h3>\u4f2a\u5143\u7d20\u4e0eCSS\u7c7b<\/h3>\n<pre><code class=\"language-css\">p.article::first-letter\n{\n\tcolor:#FF0000;\n} \n<\/code><\/pre>\n<h3>\u4f2a\u5143\u7d20\u7ed3\u5408<\/h3>\n<pre><code class=\"language-css\">p::first-letter\n{\n\tcolor:#FF0000;\n\tfont-size:xx-large;\n}\np::first-line\n{\n\tcolor:#0000FF;\n\tfont-variant:small-caps;\n}\n<\/code><\/pre>\n<h3>\u4f2a\u5143\u7d20 before<\/h3>\n<p>\u5728\u5143\u7d20\u524d\u9762\u63d2\u5165\u5185\u5bb9<\/p>\n<pre><code class=\"language-css\">\/*\u5728\u6bcf\u4e2ah1\u5143\u7d20\u524d\u63d2\u5165\u56fe\u7247*\/\nh1::before\n{\n\tcontent:url(xx.gif);\n}\n<\/code><\/pre>\n<h3>\u4f2a\u5143\u7d20 after<\/h3>\n<p>\u5728\u5143\u7d20\u540e\u9762\u63d2\u5165\u5185\u5bb9<\/p>\n<pre><code class=\"language-css\">\/*\u5728\u6bcf\u4e2ah1\u5143\u7d20\u540e\u63d2\u5165\u56fe\u7247*\/\nh1::after\n{\n\tcontent:url(xx.gif);\n}\n<\/code><\/pre>\n<h2>CSS\u8bbe\u8ba1<\/h2>\n<h3>\u5bfc\u822a\u680f<\/h3>\n<h4>\u5782\u76f4\u5bfc\u822a\u680f<\/h4>\n<pre><code class=\"language-css\">ul {\n\t\/*\u79fb\u9664\u5217\u8868\u524d\u6807\u5fd7\uff0c\u53d6\u6d88\u8fb9\u8ddd\u548c\u586b\u5145*\/\n\tlist-style-type: none;\n\tmargin: 0;\n\tpadding: 0;\n\t\/*\u8fb9\u6846*\/\n\tborder: 1px solid #555;\n\t\/*\u5168\u90e8\u9ad8\u5ea6\u56fa\u5b9a\u5bfc\u822a\u6761*\/\n\twidth: 25%;\n\tbackground-color: #f1f1f1;\n\theight: 100%;\n\tposition: fixed;\n\toverflow: auto;\n}\na {\n\t\/*\u5c06\u5c55\u793a\u65b9\u5f0f\u6539\u4e3a\u5757\u7ea7\uff0c\u6574\u4f53\u53d8\u4e3a\u53ef\u70b9\u51fb\u94fe\u63a5\u533a\u57df\uff0c\u5e76\u5141\u8bb8\u6307\u5b9a\u5bbd\u5ea6*\/\n\tdisplay: block;\n\twidth: 60px;\n}\nli {\n\t\/*\u5c45\u4e2d\uff0c\u8fb9\u6846*\/\n\ttext-align: center;\n\tborder-bottom: 1px solid #555;\n}\nli::last-child {\n\tborder-bottom: none;\n}\nli a:hover {\n\t\/*\u60ac\u505c\u80cc\u666f\u989c\u8272*\/\n\tbackground-color: #555;\n\tcolor: white;\n}\nli a:active {\n\t\/*\u6fc0\u6d3b\u80cc\u666f\u989c\u8272*\/\n\tbackground-color: #4CAF50;\n\tcolor: white;\n}\n<\/code><\/pre>\n<pre><code class=\"language-html\">&lt;ul&gt;\n\t&lt;li&gt;&lt;a href=&quot;#home&quot;&gt;\u4e3b\u9875&lt;\/a&gt;&lt;\/li&gt;\n\t&lt;li&gt;&lt;a href=&quot;#news&quot;&gt;\u65b0\u95fb&lt;\/a&gt;&lt;\/li&gt;\n\t&lt;li&gt;&lt;a href=&quot;#contact&quot;&gt;\u8054\u7cfb&lt;\/a&gt;&lt;\/li&gt;\n\t&lt;li&gt;&lt;a href=&quot;#about&quot;&gt;\u5173\u4e8e&lt;\/a&gt;&lt;\/li&gt;\n&lt;\/ul&gt;\n<\/code><\/pre>\n<h4>\u6c34\u5e73\u5bfc\u822a\u680f<\/h4>\n<pre><code class=\"language-css\">ul {\n\tlist-style-type: none;\n\tmargin: 0;\n\tpadding: 0;\n\toverflow: hidden;\n\tbackground-color: #333;\n\t\/*\u56fa\u5b9a\u5bfc\u822a\u6761*\/\n\tposition: fixed;\n\ttop: 0;\n\twidth: 100%;\n}\nli {\n\t\/*\u6d6e\u52a8\uff0c\u5f7c\u6b64\u76f8\u90bb*\/\n\tfloat: left;\n}\nli a {\n\t\/*\u5c06\u5c55\u793a\u65b9\u5f0f\u6539\u4e3a\u5757\u7ea7\uff0c\u6574\u4f53\u53d8\u4e3a\u53ef\u70b9\u51fb\u94fe\u63a5\u533a\u57df\uff0c\u5e76\u5141\u8bb8\u6307\u5b9a\u5bbd\u5ea6*\/\n\tdisplay: block;\n\twidth: 60px;\n\t\/*\u5c45\u4e2d\uff0c\u53d6\u6d88\u4e0b\u5212\u7ebf...*\/\n\tcolor: white;\n\ttext-align: center;\n\tpadding: 14px 16ps;\n\ttext-decoration: none;\n}\nli a:hover {\n\tbackground-color: #111;\n}\n\n<\/code><\/pre>\n<pre><code class=\"language-html\">&lt;ul&gt;\n\t&lt;li&gt;&lt;a href=&quot;#home&quot;&gt;\u4e3b\u9875&lt;\/a&gt;&lt;\/li&gt;\n\t&lt;li&gt;&lt;a href=&quot;#news&quot;&gt;\u65b0\u95fb&lt;\/a&gt;&lt;\/li&gt;\n\t&lt;li&gt;&lt;a href=&quot;#contact&quot;&gt;\u8054\u7cfb&lt;\/a&gt;&lt;\/li&gt;\n\t&lt;li style=&quot;float:right&quot;&gt;&lt;a href=&quot;#about&quot;&gt;\u5173\u4e8e&lt;\/a&gt;&lt;\/li&gt;\n&lt;\/ul&gt;\n<\/code><\/pre>\n<h3>\u4e0b\u62c9\u83dc\u5355<\/h3>\n<pre><code class=\"language-css\">.dropdown {\n\tposition: relative;\n\tdisplay: inline-block;\n}\n.dropbtn {\n\tbackground-color: #4CAF50;\n\tcolor: white;\n\tpadding: 16px;\n\tfont-size: 16px;\n\tborder: none;\n\tcursor: pointer;\n}\n.dropdown-content {\n\tdisplay: none;\n\tposition: absoluta;\n\tbackground-color: #F9F9F9;\n\tmin-width: 160px;\n\tbox-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n}\n.dropdown-content a {\n\tcolor: black;\n\tpadding: 12px 16px;\n\ttext-decoration: none;\n\tdisplay: block;\n}\n.dropdown-content a:hover {\n\tbackground-color: #F1F1F1;\n}\n.dropdown:hover .dropdown-content {\n\tdisplay: block;\n}\n.dropdown:hover .dropbtn {\n\tbackground-color: #3E8E41;\n}\n<\/code><\/pre>\n<pre><code class=\"language-html\">&lt;div class=&quot;dropdown&quot;&gt;\n\t&lt;button class=&quot;dropbtn&quot;&gt;\u4e0b\u62c9\u83dc\u5355&lt;\/button&gt;\n\t&lt;div class=&quot;dropdown-content&quot;&gt;\n\t\t&lt;a herf=&quot;#&quot;&gt;\u83dc\u53551&lt;\/a&gt;\n\t\t&lt;a herf=&quot;#&quot;&gt;\u83dc\u53552&lt;\/a&gt;\n\t\t&lt;a herf=&quot;#&quot;&gt;\u83dc\u53553&lt;\/a&gt;\n\t&lt;\/div&gt;\n&lt;\/div&gt;\n<\/code><\/pre>\n<h3>\u63d0\u793a\u6846<\/h3>\n<pre><code class=\"language-css\">.tooltip {\n\tposition: relative;\n\tdisplay: inline-block;\n\tborder-bottom: 1px dotted black;\n}\n.tooltip .tooltiptext {\n\tvisibility: hidden;\n\twidth: 12px;\n\tbackground-color: black;\n\tcolor: #fff;\n\ttext-align: center;\n\tpadding: 5px 0;\n\tborder-radius: 6px;\n\n\tposition: absolute;\n\tz-index: 1;\n}\n.tooltip:hover .tooltiptext {\n\tvisibility: visible;\n}\n\/*\n\u663e\u793a\u5728\u5de6\/\u53f3\u4fa7\uff0ctop\u6839\u636epadding\u4fee\u6539\n.tooltip .tooltiptext {\n    top: -5px;\n    right: 105%; \n}\n.tooltip .tooltiptext {\n    top: -5px;\n    left: 105%; \n}\n*\/\n\/*\n\u663e\u793a\u5728\u4e0a\/\u4e0b\u4fa7\uff0cmargin-left\u6839\u636e\u5bbd\u5ea6 (120\/2 = 60)\u4fee\u6539\n.tooltip .tooltiptext {\n    width: 120px;\n    bottom: 100%;\n    left: 50%; \n    margin-left: -60px;\n}\n.tooltip .tooltiptext {\n    width: 120px;\n    top: 100%;\n    left: 50%; \n    margin-left: -60px; \n}\n*\/\n<\/code><\/pre>\n<pre><code class=\"language-html\">&lt;div class=&quot;tooltip&quot;&gt;\n\t\u63d0\u793a\n\t&lt;span class=&quot;tooltiptext&quot;&gt;\u63d0\u793a\u6587\u672c&lt;\/span&gt;\n&lt;\/div&gt;\n<\/code><\/pre>\n<h3>\u56fe\u7247\u5eca<\/h3>\n<pre><code class=\"language-html\">&lt;div class=&quot;responsive&quot;&gt;\n  &lt;div class=&quot;img&quot;&gt;\n    &lt;a target=&quot;_blank&quot; href=&quot;img_fjords.jpg&quot;&gt;\n      &lt;img src=&quot;.jpg&quot; alt=&quot;Trolltunga Norway&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;\n    &lt;\/a&gt;\n    &lt;div class=&quot;desc&quot;&gt;\u56fe\u7247\u6587\u672c\u63cf\u8ff0&lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;\n \n&lt;div class=&quot;responsive&quot;&gt;\n  &lt;div class=&quot;img&quot;&gt;\n    &lt;a target=&quot;_blank&quot; href=&quot;img_forest.jpg&quot;&gt;\n      &lt;img src=&quot;.jpg&quot; alt=&quot;Forest&quot; width=&quot;600&quot; height=&quot;400&quot;&gt;\n    &lt;\/a&gt;\n    &lt;div class=&quot;desc&quot;&gt;\u56fe\u7247\u6587\u672c\u63cf\u8ff0&lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;\n \n&lt;div class=&quot;responsive&quot;&gt;\n  &lt;div class=&quot;img&quot;&gt;\n    &lt;a target=&quot;_blank&quot; href=&quot;img_lights.jpg&quot;&gt;\n      &lt;img src=&quot;.jpg&quot; alt=&quot;Northern Lights&quot; width=&quot;600&quot; height=&quot;400&quot;&gt;\n    &lt;\/a&gt;\n    &lt;div class=&quot;desc&quot;&gt;\u56fe\u7247\u6587\u672c\u63cf\u8ff0&lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;\n \n&lt;div class=&quot;responsive&quot;&gt;\n  &lt;div class=&quot;img&quot;&gt;\n    &lt;a target=&quot;_blank&quot; href=&quot;img_mountains.jpg&quot;&gt;\n      &lt;img src=&quot;.jpg&quot; alt=&quot;Mountains&quot; width=&quot;600&quot; height=&quot;400&quot;&gt;\n    &lt;\/a&gt;\n    &lt;div class=&quot;desc&quot;&gt;\u8fd9\u91cc\u6dfb\u52a0\u56fe\u7247\u6587\u672c\u63cf\u8ff0&lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;\n \n&lt;div class=&quot;clearfix&quot;&gt;&lt;\/div&gt;\n \n&lt;div style=&quot;padding:6px;&quot;&gt;\n  \n  &lt;h4&gt;\u91cd\u7f6e\u6d4f\u89c8\u5668\u5927\u5c0f\u67e5\u770b\u6548\u679c&lt;\/h4&gt;\n&lt;\/div&gt;\n<\/code><\/pre>\n<h3>\u5a92\u4f53\u7c7b\u578b<\/h3>\n<h4>@media \u89c4\u5219[!important]<\/h4>\n<p>\u54cd\u5e94\u5f0f\u8bbe\u8ba1\u7684\u6838\u5fc3<\/p>\n<pre><code class=\"language-css\">@media screen\n{\n    p.test {font-family:verdana,sans-serif;font-size:14px;}\n}\n@media print\n{\n    p.test {font-family:times,serif;font-size:10px;}\n}\n@media screen,print\n{\n    p.test {font-weight:bold;}\n}\n<\/code><\/pre>\n<table>\n<thead>\n<tr>\n<th>\u5a92\u4f53\u7c7b\u578b<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>all<\/td>\n<td>\u7528\u4e8e\u6240\u6709\u7684\u5a92\u4f53\u8bbe\u5907\u3002<\/td>\n<\/tr>\n<tr>\n<td>aural<\/td>\n<td>\u7528\u4e8e\u8bed\u97f3\u548c\u97f3\u9891\u5408\u6210\u5668\u3002<\/td>\n<\/tr>\n<tr>\n<td>braille<\/td>\n<td>\u7528\u4e8e\u76f2\u4eba\u7528\u70b9\u5b57\u6cd5\u89e6\u89c9\u56de\u9988\u8bbe\u5907\u3002<\/td>\n<\/tr>\n<tr>\n<td>embossed<\/td>\n<td>\u7528\u4e8e\u5206\u9875\u7684\u76f2\u4eba\u7528\u70b9\u5b57\u6cd5\u6253\u5370\u673a\u3002<\/td>\n<\/tr>\n<tr>\n<td>handheld<\/td>\n<td>\u7528\u4e8e\u5c0f\u7684\u624b\u6301\u7684\u8bbe\u5907\u3002<\/td>\n<\/tr>\n<tr>\n<td>print<\/td>\n<td>\u7528\u4e8e\u6253\u5370\u673a\u3002<\/td>\n<\/tr>\n<tr>\n<td>projection<\/td>\n<td>\u7528\u4e8e\u65b9\u6848\u5c55\u793a\uff0c\u6bd4\u5982\u5e7b\u706f\u7247\u3002<\/td>\n<\/tr>\n<tr>\n<td>screen<\/td>\n<td>\u7528\u4e8e\u7535\u8111\u663e\u793a\u5668\u3002<\/td>\n<\/tr>\n<tr>\n<td>tty<\/td>\n<td>\u7528\u4e8e\u4f7f\u7528\u56fa\u5b9a\u5bc6\u5ea6\u5b57\u6bcd\u6805\u683c\u7684\u5a92\u4f53\uff0c\u6bd4\u5982\u7535\u4f20\u6253\u5b57\u673a\u548c\u7ec8\u7aef\u3002<\/td>\n<\/tr>\n<tr>\n<td>tv<\/td>\n<td>\u7528\u4e8e\u7535\u89c6\u673a\u7c7b\u578b\u7684\u8bbe\u5907\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u54cd\u5e94\u5f0f\u8868\u5355<\/h3>\n<pre><code class=\"language-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;style&gt;\n* {\n  box-sizing: border-box;\n}\n\ninput[type=text], select, textarea {\n  width: 100%;\n  padding: 12px;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  resize: vertical;\n}\n\nlabel {\n  padding: 12px 12px 12px 0;\n  display: inline-block;\n}\n\ninput[type=submit] {\n  background-color: #4CAF50;\n  color: white;\n  padding: 12px 20px;\n  border: none;\n  border-radius: 4px;\n  cursor: pointer;\n  float: right;\n}\n\ninput[type=submit]:hover {\n  background-color: #45a049;\n}\n\n.container {\n  border-radius: 5px;\n  background-color: #f2f2f2;\n  padding: 20px;\n}\n\n.col-25 {\n  float: left;\n  width: 25%;\n  margin-top: 6px;\n}\n\n.col-75 {\n  float: left;\n  width: 75%;\n  margin-top: 6px;\n}\n\n\/* \u6e05\u9664\u6d6e\u52a8 *\/\n.row:after {\n  content: &quot;&quot;;\n  display: table;\n  clear: both;\n}\n \n\/* \u54cd\u5e94\u5f0f\u5e03\u5c40 layout - \u5728\u5c4f\u5e55\u5bbd\u5ea6\u5c0f\u4e8e 600px \u65f6\uff0c \u8bbe\u7f6e\u4e3a\u4e0a\u4e0b\u5806\u53e0\u5143\u7d20 *\/\n@media screen and (max-width: 600px) {\n  .col-25, .col-75, input[type=submit] {\n    width: 100%;\n    margin-top: 0;\n  }\n}\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n\n&lt;h2&gt;\u54cd\u5e94\u5f0f\u8868\u5355&lt;\/h2&gt;\n&lt;p&gt;\u54cd\u5e94\u5f0f\u8868\u5e26\u53ef\u4ee5\u6839\u636e\u6d4f\u89c8\u5668\u7a97\u53e3\u7684\u5927\u5c0f\u91cd\u65b0\u5e03\u5c40\u5404\u4e2a\u5143\u7d20\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u91cd\u7f6e\u6d4f\u89c8\u5668\u7a97\u53e3\u5927\u5c0f\u6765\u67e5\u770b\u6548\u679c\uff1a&lt;\/p&gt;\n\n&lt;div class=&quot;container&quot;&gt;\n  &lt;form action=&quot;\/action_page.php&quot;&gt;\n  &lt;div class=&quot;row&quot;&gt;\n    &lt;div class=&quot;col-25&quot;&gt;\n      &lt;label for=&quot;fname&quot;&gt;First Name&lt;\/label&gt;\n    &lt;\/div&gt;\n    &lt;div class=&quot;col-75&quot;&gt;\n      &lt;input type=&quot;text&quot; id=&quot;fname&quot; name=&quot;firstname&quot; placeholder=&quot;Your name..&quot;&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n  &lt;div class=&quot;row&quot;&gt;\n    &lt;div class=&quot;col-25&quot;&gt;\n      &lt;label for=&quot;lname&quot;&gt;Last Name&lt;\/label&gt;\n    &lt;\/div&gt;\n    &lt;div class=&quot;col-75&quot;&gt;\n      &lt;input type=&quot;text&quot; id=&quot;lname&quot; name=&quot;lastname&quot; placeholder=&quot;Your last name..&quot;&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n  &lt;div class=&quot;row&quot;&gt;\n    &lt;div class=&quot;col-25&quot;&gt;\n      &lt;label for=&quot;country&quot;&gt;Country&lt;\/label&gt;\n    &lt;\/div&gt;\n    &lt;div class=&quot;col-75&quot;&gt;\n      &lt;select id=&quot;country&quot; name=&quot;country&quot;&gt;\n        &lt;option value=&quot;australia&quot;&gt;Australia&lt;\/option&gt;\n        &lt;option value=&quot;canada&quot;&gt;Canada&lt;\/option&gt;\n        &lt;option value=&quot;usa&quot;&gt;USA&lt;\/option&gt;\n      &lt;\/select&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n  &lt;div class=&quot;row&quot;&gt;\n    &lt;div class=&quot;col-25&quot;&gt;\n      &lt;label for=&quot;subject&quot;&gt;Subject&lt;\/label&gt;\n    &lt;\/div&gt;\n    &lt;div class=&quot;col-75&quot;&gt;\n      &lt;textarea id=&quot;subject&quot; name=&quot;subject&quot; placeholder=&quot;Write something..&quot; style=&quot;height:200px&quot;&gt;&lt;\/textarea&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n  &lt;div class=&quot;row&quot;&gt;\n    &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;\n  &lt;\/div&gt;\n  &lt;\/form&gt;\n&lt;\/div&gt;\n\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n<h3>\u8ba1\u6570\u5668<\/h3>\n<h4>\u81ea\u52a8\u7f16\u53f7<\/h4>\n<p>CSS \u8ba1\u6570\u5668\u5c5e\u6027\uff1a<\/p>\n<ul>\n<li><code>counter-reset<\/code>\u00a0- \u521b\u5efa\u6216\u8005\u91cd\u7f6e\u8ba1\u6570\u5668<\/li>\n<li><code>counter-increment<\/code>\u00a0- \u9012\u589e\u53d8\u91cf<\/li>\n<li><code>content<\/code>\u00a0- \u63d2\u5165\u751f\u6210\u7684\u5185\u5bb9<\/li>\n<li><code>counter()<\/code>\u00a0\u6216\u00a0<code>counters()<\/code>\u00a0\u51fd\u6570 - \u5c06\u8ba1\u6570\u5668\u7684\u503c\u6dfb\u52a0\u5230\u5143\u7d20<br \/>\n\u4f7f\u7528 CSS \u8ba1\u6570\u5668\uff0c\u5148counter-reset\u521b\u5efa\uff1a<\/li>\n<\/ul>\n<pre><code class=\"language-css\">body {\n  counter-reset: section;\n}\n \nh2::before {\n  counter-increment: section;\n  content: &quot;Section &quot; counter(section) &quot;: &quot;;\n}\n<\/code><\/pre>\n<h4>\u5d4c\u5957\u8ba1\u6570\u5668<\/h4>\n<pre><code class=\"language-css\">body {\n  counter-reset: section;\n}\n \nh1 {\n  counter-reset: subsection;\n}\n \nh1::before {\n  counter-increment: section;\n  content: &quot;Section &quot; counter(section) &quot;. &quot;;\n}\n \nh2::before {\n  counter-increment: subsection;\n  content: counter(section) &quot;.&quot; counter(subsection) &quot; &quot;;\n}\n<\/code><\/pre>\n<h3>\u7f51\u9875\u5e03\u5c40\uff08yeah~\uff09<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/levin.ink\/wp-content\/uploads\/2024\/04\/Pasted-image-20240406113713.png\" alt=\"Pasted image 20240406113713.png\"><\/p>\n<h4>\u5934\u90e8<\/h4>\n<p>\u4e00\u822c\u7528\u4e8e\u8bbe\u7f6e\u7f51\u9875\u7684\u6807\u9898\uff0clogo\u3002<\/p>\n<pre><code class=\"language-css\">.header {\n\tbackground-color: #F1F1F1;\n\ttext-align: center;\n\tpadding: 20px;\n}\n<\/code><\/pre>\n<h4>\u83dc\u5355\u5bfc\u822a<\/h4>\n<p>\u5305\u542b\u4e00\u4e9b\u94fe\u63a5\u3002<\/p>\n<pre><code class=\"language-css\">.topnav {\n\toverflow: hidden;\n\tbackground-color: #333;\n}\n.topnav a {\n\tfloat: left;\n\tdisplay: block;\n\tcolor: #f2f2f2;\n\ttext-align: center;\n\tpadding: 14px, 16px;\n\ttext-decoration: none;\n}\n.topnav a:hover {\n\tbackground-color: #ddd;\n\tcolor: black;\n}\n<\/code><\/pre>\n<h4>\u5185\u5bb9\u533a\u57df<\/h4>\n<p>\u4e09\u79cd\u5f62\u5f0f\uff1a\u5355\u5217\u901a\u5e38\u7528\u4e8e\u79fb\u52a8\u7aef\uff0c\u53cc\u5217\u901a\u5e38\u7528\u4e8e\u5e73\u677f\u8bbe\u5907\uff0c\u4e09\u5217\u901a\u5e38\u7528\u4e8ePC\u7aef\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/levin.ink\/wp-content\/uploads\/2024\/04\/Pasted-image-20240406114400.jpg\" alt=\"Pasted image 20240406114400.jpg\"><\/p>\n<pre><code class=\"language-css\">.column {\n\tfloat: left;\n\twidth: 33.33%;\n}\n\/*\u5217\u540e\u6e05\u9664\u6d6e\u52a8*\/\n.row:after {\n\tcontent: &quot;&quot;;\n\tdisplay: table;\n\tclear: both;\n}\n@media screen and (max-width: 600px) {\n.column {\n\twidth: 100%;\n}\n}\n<\/code><\/pre>\n<p>\u4e0d\u76f8\u7b49\u7684\u5217\uff0c\u901a\u5e38\u4e2d\u95f4\u5757\u6700\u5927\uff0c\u4e24\u8fb9\u4f5c\u5bfc\u822a\uff0c\u52a0\u8d77\u6765\u603b\u5bbd\u5ea6100%\u3002<\/p>\n<pre><code class=\"language-css\">.column {\n\tfloat: left;\n}\n.column .side {\n\twidth: 25%;\n}\n.column .middle {\n\twidth: 50%;\n}\n@media screen and (max-width: 600px) {\n.column .side, .column .middle {\n\twidth: 100%;\n}\n}\n<\/code><\/pre>\n<h4>\u5e95\u90e8\u533a\u57df<\/h4>\n<p>\u4e00\u822c\u5305\u542b\u7248\u6743\u4fe1\u606f\u548c\u8054\u7cfb\u65b9\u5f0f\u7b49\u3002<\/p>\n<pre><code class=\"language-css\">.footer {\n\tbackground-color: #f1f1f1;\n\ttext-align: center;\n\tpadding: 10px;\n}\n<\/code><\/pre>\n<h2>\u54cd\u5e94\u5f0fWeb\u8bbe\u8ba1<\/h2>\n<h3>Viewport<\/h3>\n<p>viewport\uff08\u89c6\u533a\uff09 \u662f\u7528\u6237\u7f51\u9875\u7684\u53ef\u89c6\u533a\u57df\u3002<br \/>\n\u624b\u673a\u6d4f\u89c8\u5668\u628a\u9875\u9762\u653e\u5728\u4e00\u4e2a\u865a\u62df\u7684&quot;\u7a97\u53e3&quot;\uff08viewport\uff09\u4e2d\uff0c\u901a\u5e38viewport\u6bd4\u5c4f\u5e55\u5bbd\uff0c\u4e0d\u7528\u628a\u6bcf\u4e2a\u7f51\u9875\u6324\u5230\u5f88\u5c0f\u7684\u7a97\u53e3\u4e2d\uff08\u4f1a\u7834\u574f\u6ca1\u6709\u9488\u5bf9\u624b\u673a\u6d4f\u89c8\u5668\u4f18\u5316\u7684\u7f51\u9875\u7684\u5e03\u5c40\uff09\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5e73\u79fb\u548c\u7f29\u653e\u6765\u770b\u7f51\u9875\u7684\u4e0d\u540c\u90e8\u5206\u3002<\/p>\n<h4>\u8bbe\u7f6eviewport<\/h4>\n<p>\u4e00\u4e2a\u5e38\u7528\u7684\u9488\u5bf9\u79fb\u52a8\u7f51\u9875\u4f18\u5316\u8fc7\u7684\u9875\u9762\u7684 viewport meta \u6807\u7b7e<br \/>\n<code>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<\/code><\/p>\n<ul>\n<li>width\uff1a\u63a7\u5236 viewport \u7684\u5927\u5c0f\uff0c\u53ef\u4ee5\u6307\u5b9a\u7684\u4e00\u4e2a\u503c\uff0c\u5982 600\uff0c\u6216\u8005\u7279\u6b8a\u7684\u503c\uff0c\u5982 device-width \u4e3a\u8bbe\u5907\u7684\u5bbd\u5ea6\uff08\u5355\u4f4d\u4e3a\u7f29\u653e\u4e3a 100% \u65f6\u7684 CSS \u7684\u50cf\u7d20\uff09\u3002<\/li>\n<li>height\uff1a\u548c width \u76f8\u5bf9\u5e94\uff0c\u6307\u5b9a\u9ad8\u5ea6\u3002<\/li>\n<li>initial-scale\uff1a\u521d\u59cb\u7f29\u653e\u6bd4\u4f8b\uff0c\u4e5f\u5373\u662f\u5f53\u9875\u9762\u7b2c\u4e00\u6b21 load \u7684\u65f6\u5019\u7f29\u653e\u6bd4\u4f8b\u3002<\/li>\n<li>maximum-scale\uff1a\u5141\u8bb8\u7528\u6237\u7f29\u653e\u5230\u7684\u6700\u5927\u6bd4\u4f8b\u3002<\/li>\n<li>minimum-scale\uff1a\u5141\u8bb8\u7528\u6237\u7f29\u653e\u5230\u7684\u6700\u5c0f\u6bd4\u4f8b\u3002<\/li>\n<li>user-scalable\uff1a\u7528\u6237\u662f\u5426\u53ef\u4ee5\u624b\u52a8\u7f29\u653e\u3002<\/li>\n<\/ul>\n<h3>\u7f51\u683c\u89c6\u56fe<\/h3>\n<p>\u54cd\u5e94\u5f0f\u7f51\u683c\u89c6\u56fe\u901a\u5e38\u662f 12 \u5217\uff0c\u5bbd\u5ea6\u4e3a100%\uff0c\u5728\u6d4f\u89c8\u5668\u7a97\u53e3\u5927\u5c0f\u8c03\u6574\u65f6\u4f1a\u81ea\u52a8\u4f38\u7f29\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/levin.ink\/wp-content\/uploads\/2024\/04\/Pasted-image-20240406154749.jpg\" alt=\"Pasted image 20240406154749.jpg\"><\/p>\n<h4>\u521b\u5efa\u54cd\u5e94\u5f0f\u7f51\u683c\u89c6\u56fe<\/h4>\n<p>\u786e\u4fdd\u6240\u6709\u7684html\u5143\u7d20\u90fd\u6709box-sizing\u5c5e\u6027\u5e76\u4e14\u8bbe\u7f6e\u4e3aborder-box\u3002\u8fb9\u8ddd\u548c\u8fb9\u6846\u5305\u542b\u5728\u5143\u7d20\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u95f4\u3002<\/p>\n<pre><code class=\"language-css\">* {\n\tbox-sizing: border-box;\n}\n<\/code><\/pre>\n<p>12 \u5217\u7684\u7f51\u683c\u7cfb\u7edf\u53ef\u4ee5\u66f4\u597d\u7684\u63a7\u5236\u54cd\u5e94\u5f0f\u7f51\u9875\u3002<br \/>\n\u9996\u5148\u6211\u4eec\u53ef\u4ee5\u8ba1\u7b97\u6bcf\u5217\u7684\u767e\u5206\u6bd4: 100% \/ 12 \u5217 = 8.33%\u3002<br \/>\n\u5728\u6bcf\u5217\u4e2d\u6307\u5b9a class\uff0c\u7528\u4e8e\u5b9a\u4e49\u6bcf\u5217\u6709\u51e0\u4e2a span \uff1a<\/p>\n<pre><code class=\"language-css\">.col-1 {width: 8.33%;}\n.col-2 {width: 16.66%;}\n.col-3 {width: 25%;}\n.col-4 {width: 33.33%;}\n.col-5 {width: 41.66%;}\n.col-6 {width: 50%;}\n.col-7 {width: 58.33%;}\n.col-8 {width: 66.66%;}\n.col-9 {width: 75%;}\n.col-10 {width: 83.33%;}\n.col-11 {width: 91.66%;}\n.col-12 {width: 100%;}\n<\/code><\/pre>\n<p>\u6240\u6709\u7684\u5217\u5411\u5de6\u6d6e\u52a8\uff0c\u95f4\u8ddd(padding) \u4e3a 15px\uff1a<\/p>\n<pre><code class=\"language-css\">[class*=&quot;col-&quot;] {\n\tfloat: left;\u00a0\u00a0\u00a0 \n\tpadding: 15px;\u00a0\u00a0\u00a0 \n\tborder: 1px solid red;\n}\n<\/code><\/pre>\n<p>\u6bcf\u4e00\u884c\u4f7f\u7528 &lt;div&gt; \u5305\u88f9\u3002\u6240\u6709\u5217\u6570\u52a0\u8d77\u6765\u5e94\u4e3a 12\uff1a<\/p>\n<pre><code class=\"language-html\">&lt;div\u00a0class=&quot;row&quot;&gt;  \n\u00a0\u00a0&lt;div\u00a0class=&quot;col-3&quot;&gt;...&lt;\/div&gt;  \n\u00a0\u00a0&lt;div\u00a0class=&quot;col-9&quot;&gt;...&lt;\/div&gt;  \n&lt;\/div&gt;\n<\/code><\/pre>\n<h3>\u5a92\u4f53\u67e5\u8be2<\/h3>\n<p>@media \u67e5\u8be2\u53ef\u4ee5\u9488\u5bf9\u4e0d\u540c\u7684\u5a92\u4f53\u7c7b\u578b\u5b9a\u4e49\u4e0d\u540c\u7684\u6837\u5f0f\u3002<\/p>\n<h4>\u6dfb\u52a0\u65ad\u70b9<\/h4>\n<p>\u5728\u8bbe\u8ba1\u7a3f\u7684\u4e2d\u95f4\u6dfb\u52a0\u65ad\u70b9\uff0c\u4e0d\u540c\u7684\u65ad\u70b9\u6709\u4e0d\u540c\u7684\u6548\u679c\u3002<br \/>\n\u5728 768px \u6dfb\u52a0\u65ad\u70b9\uff1a<\/p>\n<pre><code class=\"language-css\">\/* For desktop: *\/\n.col-1 {width: 8.33%;}\n.col-2 {width: 16.66%;}\n.col-3 {width: 25%;}\n.col-4 {width: 33.33%;}\n.col-5 {width: 41.66%;}\n.col-6 {width: 50%;}\n.col-7 {width: 58.33%;}\n.col-8 {width: 66.66%;}\n.col-9 {width: 75%;}\n.col-10 {width: 83.33%;}\n.col-11 {width: 91.66%;}\n.col-12 {width: 100%;}\n@media only screen and (max-width: 768px) {\u00a0\u00a0\u00a0 \n\/* For mobile phones: *\/\u00a0\u00a0\u00a0 \n[class*=&quot;col-&quot;] {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \n\twidth: 100%;\u00a0\u00a0\u00a0 \n}\n}\n<\/code><\/pre>\n<h4>\u4e3a\u79fb\u52a8\u7aef\u4f18\u5148\u8bbe\u8ba1<\/h4>\n<pre><code class=\"language-css\">\/* \u4e3a\u79fb\u52a8\u7aef\u8bbe\u8ba1: *\/\n[class*=&quot;col-&quot;] {\u00a0\u00a0\u00a0\n\twidth: 100%;\n}\n@media only screen and (min-width: 768px) {\u00a0\u00a0\u00a0 \n\/* For desktop: *\/\u00a0\u00a0\u00a0 \n.col-1 {width: 8.33%;}\u00a0\u00a0\u00a0 \n.col-2 {width: 16.66%;}\u00a0\u00a0\u00a0 \n.col-3 {width: 25%;}\u00a0\u00a0\u00a0 \n.col-4 {width: 33.33%;}\u00a0\u00a0\u00a0 \n.col-5 {width: 41.66%;}\u00a0\u00a0\u00a0 \n.col-6 {width: 50%;}\u00a0\u00a0\u00a0 \n.col-7 {width: 58.33%;}\u00a0\u00a0\u00a0 \n.col-8 {width: 66.66%;}\u00a0\u00a0\u00a0 \n.col-9 {width: 75%;}\u00a0\u00a0\u00a0 \n.col-10 {width: 83.33%;}\u00a0\u00a0\u00a0 \n.col-11 {width: 91.66%;}\u00a0\u00a0\u00a0 \n.col-12 {width: 100%;}\n}\n<\/code><\/pre>\n<h4>\u5176\u4ed6\u65ad\u70b9<\/h4>\n<p>\u53ef\u4e3a\u5e73\u677f\u6dfb\u52a0\u65ad\u70b9\uff1a<\/p>\n<pre><code class=\"language-css\">\/* For mobile phones: *\/\n[class*=&quot;col-&quot;] {\u00a0\u00a0\u00a0 \n\twidth: 100%;\n}\n@media only screen and (min-width: 600px) {\u00a0\u00a0\u00a0 \n\/* For tablets: *\/\u00a0\u00a0\u00a0 \n.col-m-1 {width: 8.33%;}\u00a0\u00a0\u00a0 \n.col-m-2 {width: 16.66%;}\u00a0\u00a0\u00a0 \n.col-m-3 {width: 25%;}\u00a0\u00a0\u00a0 \n.col-m-4 {width: 33.33%;}\u00a0\u00a0\u00a0 \n.col-m-5 {width: 41.66%;}\u00a0\u00a0\u00a0 \n.col-m-6 {width: 50%;}\u00a0\u00a0\u00a0 \n.col-m-7 {width: 58.33%;}\u00a0\u00a0\u00a0 \n.col-m-8 {width: 66.66%;}\u00a0\u00a0\u00a0 \n.col-m-9 {width: 75%;}\u00a0\u00a0\u00a0 \n.col-m-10 {width: 83.33%;}\u00a0\u00a0\u00a0 \n.col-m-11 {width: 91.66%;}\u00a0\u00a0\u00a0 \n.col-m-12 {width: 100%;}\n}\n@media only screen and (min-width: 768px) {\u00a0\u00a0\u00a0 \n\/* For desktop: *\/\u00a0\u00a0\u00a0 \n.col-1 {width: 8.33%;}\u00a0\u00a0\u00a0 \n.col-2 {width: 16.66%;}\u00a0\u00a0\u00a0 \n.col-3 {width: 25%;}\u00a0\u00a0\u00a0 \n.col-4 {width: 33.33%;}\u00a0\u00a0\u00a0 \n.col-5 {width: 41.66%;}\u00a0\u00a0\u00a0 \n.col-6 {width: 50%;}\u00a0\u00a0\u00a0 \n.col-7 {width: 58.33%;}\u00a0\u00a0\u00a0 \n.col-8 {width: 66.66%;}\u00a0\u00a0\u00a0 \n.col-9 {width: 75%;}\u00a0\u00a0\u00a0 \n.col-10 {width: 83.33%;}\u00a0\u00a0\u00a0 \n.col-11 {width: 91.66%;}\u00a0\u00a0\u00a0 \n.col-12 {width: 100%;}\n}\n<\/code><\/pre>\n<h4>\u6a2a\u5c4f\u7ad6\u5c4f<\/h4>\n<p>\u7ed3\u5408CSS\u5a92\u4f53\u67e5\u8be2,\u53ef\u4ee5\u521b\u5efa\u9002\u5e94\u4e0d\u540c\u8bbe\u5907\u7684\u65b9\u5411(\u6a2a\u5c4flandscape\u3001\u7ad6\u5c4fportrait\u7b49)\u7684\u5e03\u5c40\u3002<\/p>\n<p>orientation\uff1aportrait | landscape<\/p>\n<ul>\n<li><strong>portrait\uff1a<\/strong> \u6307\u5b9a\u8f93\u51fa\u8bbe\u5907\u4e2d\u7684\u9875\u9762\u53ef\u89c1\u533a\u57df\u9ad8\u5ea6\u5927\u4e8e\u6216\u7b49\u4e8e\u5bbd\u5ea6\u3002<\/li>\n<li><strong>landscape\uff1a<\/strong> \u9664portrait\u503c\u60c5\u51b5\u5916\uff0c\u90fd\u662flandscape\u3002<\/li>\n<\/ul>\n<pre><code class=\"language-css\">@media only screen and (orientation: landscape) {\u00a0\u00a0\u00a0 \nbody {\n\tbackground-color: lightblue;\u00a0\u00a0\u00a0 \n}\n}\n<\/code><\/pre>\n<h3>\u56fe\u7247<\/h3>\n<p>\u4f7f\u7528 width \u5c5e\u6027<br \/>\n\u5982\u679c width \u5c5e\u6027\u8bbe\u7f6e\u4e3a 100%\uff0c\u56fe\u7247\u4f1a\u6839\u636e\u4e0a\u4e0b\u8303\u56f4\u5b9e\u73b0\u54cd\u5e94\u5f0f\u529f\u80fd<\/p>\n<pre><code class=\"language-css\">img\u00a0{  \n\u00a0\u00a0\u00a0\u00a0width:\u00a0100%;  \n\u00a0\u00a0\u00a0\u00a0height:\u00a0auto;  \n}\n<\/code><\/pre>\n<p>\u5982\u679c max-width \u5c5e\u6027\u8bbe\u7f6e\u4e3a 100%, \u56fe\u7247\u6c38\u8fdc\u4e0d\u4f1a\u5927\u4e8e\u5176\u539f\u59cb\u5927\u5c0f<\/p>\n<pre><code class=\"language-css\">img\u00a0{  \n\u00a0\u00a0\u00a0\u00a0max-width:\u00a0100%;  \n\u00a0\u00a0\u00a0\u00a0height:\u00a0auto;  \n}\n<\/code><\/pre>\n<h4>\u80cc\u666f\u56fe\u7247<\/h4>\n<p>\u5982\u679c background-size \u5c5e\u6027\u8bbe\u7f6e\u4e3a &quot;contain&quot;, \u80cc\u666f\u56fe\u7247\u5c06\u6309\u6bd4\u4f8b\u81ea\u9002\u5e94\u5185\u5bb9\u533a\u57df\u3002\u56fe\u7247\u4fdd\u6301\u5176\u6bd4\u4f8b\u4e0d\u53d8\uff1a<\/p>\n<pre><code class=\"language-css\">div\u00a0{  \n\u00a0\u00a0\u00a0\u00a0width:\u00a0100%;  \n\u00a0\u00a0\u00a0\u00a0height:\u00a0400px;  \n\u00a0\u00a0\u00a0\u00a0background-image:\u00a0url('img_flowers.jpg');  \n\u00a0\u00a0\u00a0\u00a0background-repeat:\u00a0no-repeat;  \n\u00a0\u00a0\u00a0\u00a0background-size:\u00a0contain;  \n\u00a0\u00a0\u00a0\u00a0border:\u00a01px solid red;  \n}\n<\/code><\/pre>\n<p>\u5982\u679c background-size \u5c5e\u6027\u8bbe\u7f6e\u4e3a &quot;100% 100%&quot; \uff0c\u80cc\u666f\u56fe\u7247\u5c06\u5ef6\u5c55\u8986\u76d6\u6574\u4e2a\u533a\u57df\uff1a<\/p>\n<pre><code class=\"language-css\">div\u00a0{  \n\u00a0\u00a0\u00a0\u00a0width:\u00a0100%;  \n\u00a0\u00a0\u00a0\u00a0height:\u00a0400px;  \n\u00a0\u00a0\u00a0\u00a0background-image:\u00a0url('img_flowers.jpg');  \n\u00a0\u00a0\u00a0\u00a0background-size:\u00a0100% 100%;  \n\u00a0\u00a0\u00a0\u00a0border:\u00a01px solid red;  \n}\n<\/code><\/pre>\n<p>\u5982\u679c background-size \u5c5e\u6027\u8bbe\u7f6e\u4e3a &quot;cover&quot;\uff0c\u5219\u4f1a\u628a\u80cc\u666f\u56fe\u50cf\u6269\u5c55\u81f3\u8db3\u591f\u5927\uff0c\u4ee5\u4f7f\u80cc\u666f\u56fe\u50cf\u5b8c\u5168\u8986\u76d6\u80cc\u666f\u533a\u57df\u3002\u6ce8\u610f\u8be5\u5c5e\u6027\u4fdd\u6301\u4e86\u56fe\u7247\u7684\u6bd4\u4f8b\u56e0\u6b64 \u80cc\u666f\u56fe\u50cf\u7684\u67d0\u4e9b\u90e8\u5206\u65e0\u6cd5\u663e\u793a\u5728\u80cc\u666f\u5b9a\u4f4d\u533a\u57df\u4e2d\u3002<\/p>\n<pre><code class=\"language-css\">div\u00a0{  \n\u00a0\u00a0\u00a0\u00a0width:\u00a0100%;  \n\u00a0\u00a0\u00a0\u00a0height:\u00a0400px;  \n\u00a0\u00a0\u00a0\u00a0background-image:\u00a0url('img_flowers.jpg');  \n\u00a0\u00a0\u00a0\u00a0background-size:\u00a0cover;  \n\u00a0\u00a0\u00a0\u00a0border:\u00a01px solid red;  \n}\n<\/code><\/pre>\n<h4>[[First floor - 1 HTML#HTML5 &lt;picture&gt; \u5143\u7d20]]<\/h4>\n<h3>\u89c6\u9891<\/h3>\n<p>\u5982\u679c width \u5c5e\u6027\u8bbe\u7f6e\u4e3a 100%\uff0c\u89c6\u9891\u64ad\u653e\u5668\u4f1a\u6839\u636e\u5c4f\u5e55\u5927\u5c0f\u81ea\u52a8\u8c03\u6574\u6bd4\u4f8b\uff1a<\/p>\n<pre><code class=\"language-css\">video\u00a0{  \n\u00a0\u00a0\u00a0\u00a0width:\u00a0100%;  \n\u00a0\u00a0\u00a0\u00a0height:\u00a0auto;  \n}\n<\/code><\/pre>\n<p>\u5982\u679c max-width \u5c5e\u6027\u8bbe\u7f6e\u4e3a 100%, \u89c6\u9891\u64ad\u653e\u5668\u4f1a\u6839\u636e\u5c4f\u5e55\u81ea\u52a8\u8c03\u6574\u6bd4\u4f8b\uff0c\u4f46\u4e0d\u4f1a\u8d85\u8fc7\u5176\u539f\u59cb\u5927\u5c0f\uff1a<\/p>\n<pre><code class=\"language-css\">video\u00a0{  \n\u00a0\u00a0\u00a0\u00a0max-width:\u00a0100%;  \n\u00a0\u00a0\u00a0\u00a0height:\u00a0auto;  \n}\n<\/code><\/pre>\n<p>\u5728\u7f51\u9875\u4e2d\u6dfb\u52a0\u89c6\u9891\u3002\u6839\u636e div \u533a\u57df\u5927\u5c0f\u81ea\u52a8\u8c03\u6574\u5e76\u5360\u6ee1\u6574\u4e2a div \u533a\u57df\uff1a<\/p>\n<pre><code class=\"language-css\">video\u00a0{  \n\u00a0\u00a0\u00a0\u00a0width:\u00a0100%;  \n\u00a0\u00a0\u00a0\u00a0height:\u00a0auto;  \n}\n<\/code><\/pre>\n<h2>CSS3<\/h2>\n<h3>\u8fb9\u6846<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u5c5e\u6027<\/th>\n<th style=\"text-align:left\">\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-border-image.html\">border-image<\/a><\/td>\n<td style=\"text-align:left\">\u8bbe\u7f6e\u6240\u6709\u8fb9\u6846\u56fe\u50cf\u7684\u901f\u8bb0\u5c5e\u6027\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-border-radius.html\">border-radius<\/a><\/td>\n<td style=\"text-align:left\">\u4e00\u4e2a\u7528\u4e8e\u8bbe\u7f6e\u6240\u6709\u56db\u4e2a\u8fb9\u6846- *-\u534a\u5f84\u5c5e\u6027\u7684\u901f\u8bb0\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-box-shadow.html\">box-shadow<\/a><\/td>\n<td style=\"text-align:left\">\u9644\u52a0\u4e00\u4e2a\u6216\u591a\u4e2a\u4e0b\u62c9\u6846\u7684\u9634\u5f71<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><code class=\"language-css\">border-radius:25px;\nbox-shadow: 10px 10px 5px #888888;\n<\/code><\/pre>\n<h4>\u5706\u89d2<\/h4>\n<ul>\n<li><strong>\u56db\u4e2a\u503c:<\/strong>\u00a0\u7b2c\u4e00\u4e2a\u503c\u4e3a\u5de6\u4e0a\u89d2\uff0c\u7b2c\u4e8c\u4e2a\u503c\u4e3a\u53f3\u4e0a\u89d2\uff0c\u7b2c\u4e09\u4e2a\u503c\u4e3a\u53f3\u4e0b\u89d2\uff0c\u7b2c\u56db\u4e2a\u503c\u4e3a\u5de6\u4e0b\u89d2\u3002<\/li>\n<li><strong>\u4e09\u4e2a\u503c:<\/strong>\u00a0\u7b2c\u4e00\u4e2a\u503c\u4e3a\u5de6\u4e0a\u89d2, \u7b2c\u4e8c\u4e2a\u503c\u4e3a\u53f3\u4e0a\u89d2\u548c\u5de6\u4e0b\u89d2\uff0c\u7b2c\u4e09\u4e2a\u503c\u4e3a\u53f3\u4e0b\u89d2<\/li>\n<li><strong>\u4e24\u4e2a\u503c:<\/strong>\u00a0\u7b2c\u4e00\u4e2a\u503c\u4e3a\u5de6\u4e0a\u89d2\u4e0e\u53f3\u4e0b\u89d2\uff0c\u7b2c\u4e8c\u4e2a\u503c\u4e3a\u53f3\u4e0a\u89d2\u4e0e\u5de6\u4e0b\u89d2<\/li>\n<li><strong>\u4e00\u4e2a\u503c\uff1a<\/strong>\u00a0\u56db\u4e2a\u5706\u89d2\u503c\u76f8\u540c<br \/>\n\u692d\u5706\u5706\u89d2<\/li>\n<\/ul>\n<pre><code class=\"language-css\">border-radius: 50px\/15px;\nborder-radius: 15px\/50px;\nborder-radius: 50%;\n<\/code><\/pre>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-border-radius.html\">border-radius<\/a><\/td>\n<td>\u6240\u6709\u56db\u4e2a\u8fb9\u89d2 border-<em>-<\/em>-radius \u5c5e\u6027\u7684\u7f29\u5199<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-border-top-left-radius.html\">border-top-left-radius<\/a><\/td>\n<td>\u5b9a\u4e49\u4e86\u5de6\u4e0a\u89d2\u7684\u5f27\u5ea6<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-border-top-right-radius.html\">border-top-right-radius<\/a><\/td>\n<td>\u5b9a\u4e49\u4e86\u53f3\u4e0a\u89d2\u7684\u5f27\u5ea6<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-border-bottom-right-radius.html\">border-bottom-right-radius<\/a><\/td>\n<td>\u5b9a\u4e49\u4e86\u53f3\u4e0b\u89d2\u7684\u5f27\u5ea6<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-border-bottom-left-radius.html\">border-bottom-left-radius<\/a><\/td>\n<td>\u5b9a\u4e49\u4e86\u5de6\u4e0b\u89d2\u7684\u5f27\u5ea6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u80cc\u666f<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u987a\u5e8f<\/th>\n<th style=\"text-align:left\">\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-background-clip.html\">background-clip<\/a><\/td>\n<td style=\"text-align:left\">\u89c4\u5b9a\u80cc\u666f\u7684\u7ed8\u5236\u533a\u57df\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-background-origin.html\">background-origin<\/a><\/td>\n<td style=\"text-align:left\">\u89c4\u5b9a\u80cc\u666f\u56fe\u7247\u7684\u5b9a\u4f4d\u533a\u57df\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-background-size.html\">background-size<\/a><\/td>\n<td style=\"text-align:left\">\u89c4\u5b9a\u80cc\u666f\u56fe\u7247\u7684\u5c3a\u5bf8\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u6e10\u53d8<\/h3>\n<ul>\n<li><strong>\u7ebf\u6027\u6e10\u53d8\uff08Linear Gradients\uff09- \u5411\u4e0b\/\u5411\u4e0a\/\u5411\u5de6\/\u5411\u53f3\/\u5bf9\u89d2\u65b9\u5411<\/strong><\/li>\n<li><strong>\u5f84\u5411\u6e10\u53d8\uff08Radial Gradients\uff09- \u7531\u5b83\u4eec\u7684\u4e2d\u5fc3\u5b9a\u4e49<\/strong><br \/>\n\u8bed\u6cd5\uff1a<\/li>\n<\/ul>\n<pre><code class=\"language-css\">background-image: linear-gradient(direction, color-stop1, color-stop2, ...);\n\/*\u4efb\u610f\u89d2\u5ea6*\/\nbackground-image: linear-gradient(angle, color-stop1, color-stop2);\n\/*\u4e0d\u900f\u660e\u5ea6*\/\nbackground-image: linear-gradient(to right, rgba(255,0,0,0), rgba(255,0,0,1));\n\/*\u5f84\u5411\u6e10\u53d8*\/\nbackground-image: radial-gradient(shape size at position, start-color, ..., last-color);\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/levin.ink\/wp-content\/uploads\/2024\/04\/Pasted-image-20240407093023.jpg\" alt=\"Pasted image 20240407093023.jpg\"><\/p>\n<h3>\u6587\u672c\u6548\u679c<\/h3>\n<pre><code class=\"language-css\">text-shadow: 5px 5px 5px #FF0000;\nbox-shadow: 10px 10px 5px #888888;\n<\/code><\/pre>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-hanging-punctuation.html\" title=\"CSS3 hanging-punctuation \u5c5e\u6027\">hanging-punctuation<\/a><\/td>\n<td>\u89c4\u5b9a\u6807\u70b9\u5b57\u7b26\u662f\u5426\u4f4d\u4e8e\u7ebf\u6846\u4e4b\u5916\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-punctuation-trim.html\" title=\"CSS3 punctuation-trim \u5c5e\u6027\">punctuation-trim<\/a><\/td>\n<td>\u89c4\u5b9a\u662f\u5426\u5bf9\u6807\u70b9\u5b57\u7b26\u8fdb\u884c\u4fee\u526a\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-text-align-last.html\">text-align-last<\/a><\/td>\n<td>\u8bbe\u7f6e\u5982\u4f55\u5bf9\u9f50\u6700\u540e\u4e00\u884c\u6216\u7d27\u6328\u7740\u5f3a\u5236\u6362\u884c\u7b26\u4e4b\u524d\u7684\u884c\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/css3\/css3-pr-text-emphasis.html\">text-emphasis<\/a><\/td>\n<td>\u5411\u5143\u7d20\u7684\u6587\u672c\u5e94\u7528\u91cd\u70b9\u6807\u8bb0\u4ee5\u53ca\u91cd\u70b9\u6807\u8bb0\u7684\u524d\u666f\u8272\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-text-justify.html\" title=\"CSS3 text-justify \u5c5e\u6027\">text-justify<\/a><\/td>\n<td>\u89c4\u5b9a\u5f53 text-align \u8bbe\u7f6e\u4e3a &quot;justify&quot; \u65f6\u6240\u4f7f\u7528\u7684\u5bf9\u9f50\u65b9\u6cd5\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-text-outline.html\" title=\"CSS3 text-outline \u5c5e\u6027\">text-outline<\/a><\/td>\n<td>\u89c4\u5b9a\u6587\u672c\u7684\u8f6e\u5ed3\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-text-overflow.html\" title=\"CSS3 text-overflow \u5c5e\u6027\">text-overflow<\/a><\/td>\n<td>\u89c4\u5b9a\u5f53\u6587\u672c\u6ea2\u51fa\u5305\u542b\u5143\u7d20\u65f6\u53d1\u751f\u7684\u4e8b\u60c5\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-text-shadow.html\" title=\"CSS3 text-shadow \u5c5e\u6027\">text-shadow<\/a><\/td>\n<td>\u5411\u6587\u672c\u6dfb\u52a0\u9634\u5f71\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-text-wrap.html\" title=\"CSS3 text-wrap \u5c5e\u6027\">text-wrap<\/a><\/td>\n<td>\u89c4\u5b9a\u6587\u672c\u7684\u6362\u884c\u89c4\u5219\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-word-break.html\" title=\"CSS3 word-break \u5c5e\u6027\">word-break<\/a><\/td>\n<td>\u89c4\u5b9a\u975e\u4e2d\u65e5\u97e9\u6587\u672c\u7684\u6362\u884c\u89c4\u5219\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-word-wrap.html\" title=\"CSS3 word-wrap \u5c5e\u6027\">word-wrap<\/a><\/td>\n<td>\u5141\u8bb8\u5bf9\u957f\u7684\u4e0d\u53ef\u5206\u5272\u7684\u5355\u8bcd\u8fdb\u884c\u5206\u5272\u5e76\u6362\u884c\u5230\u4e0b\u4e00\u884c\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5b57\u4f53<\/h3>\n<p><strong>@font-face<\/strong>\u89c4\u5219\uff1a\u5b57\u4f53\u6587\u4ef6\u5305\u542b\u5728\u7f51\u7ad9\u4e2d\uff0c\u5b83\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u7ed9\u9700\u8981\u7684\u7528\u6237\u3002<\/p>\n<pre><code class=\"language-css\">@font-face {\n    font-family: myFirstFont;\n    src: url(sansation_light.woff);\n}\n\/*\u4f7f\u7528\u7c97\u4f53*\/\n@font-face { \n\tfont-family: myFirstFont; \n\tsrc: url(sansation_bold.woff); \n\tfont-weight:bold; \n}\ndiv {\n    font-family:myFirstFont;\n}\n<\/code><\/pre>\n<table>\n<thead>\n<tr>\n<th>\u63cf\u8ff0\u7b26<\/th>\n<th>\u503c<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>font-family<\/td>\n<td><em>name<\/em><\/td>\n<td>\u5fc5\u9700\u3002\u89c4\u5b9a\u5b57\u4f53\u7684\u540d\u79f0\u3002<\/td>\n<\/tr>\n<tr>\n<td>src<\/td>\n<td><em>URL<\/em><\/td>\n<td>\u5fc5\u9700\u3002\u5b9a\u4e49\u5b57\u4f53\u6587\u4ef6\u7684 URL\u3002<\/td>\n<\/tr>\n<tr>\n<td>font-stretch<\/td>\n<td>- normal&lt;br&gt;- condensed&lt;br&gt;- ultra-condensed&lt;br&gt;- extra-condensed&lt;br&gt;- semi-condensed&lt;br&gt;- expanded&lt;br&gt;- semi-expanded&lt;br&gt;- extra-expanded&lt;br&gt;- ultra-expanded<\/td>\n<td>\u53ef\u9009\u3002\u5b9a\u4e49\u5982\u4f55\u62c9\u4f38\u5b57\u4f53\u3002\u9ed8\u8ba4\u662f &quot;normal&quot;\u3002<\/td>\n<\/tr>\n<tr>\n<td>font-style<\/td>\n<td>- normal&lt;br&gt;- italic&lt;br&gt;- oblique<\/td>\n<td>\u53ef\u9009\u3002\u5b9a\u4e49\u5b57\u4f53\u7684\u6837\u5f0f\u3002\u9ed8\u8ba4\u662f &quot;normal&quot;\u3002<\/td>\n<\/tr>\n<tr>\n<td>font-weight<\/td>\n<td>- normal&lt;br&gt;- bold&lt;br&gt;- 100&lt;br&gt;- 200&lt;br&gt;- 300&lt;br&gt;- 400&lt;br&gt;- 500&lt;br&gt;- 600&lt;br&gt;- 700&lt;br&gt;- 800&lt;br&gt;- 900<\/td>\n<td>\u53ef\u9009\u3002\u5b9a\u4e49\u5b57\u4f53\u7684\u7c97\u7ec6\u3002\u9ed8\u8ba4\u662f &quot;normal&quot;\u3002<\/td>\n<\/tr>\n<tr>\n<td>unicode-range<\/td>\n<td><em>unicode-range<\/em><\/td>\n<td>\u53ef\u9009\u3002\u5b9a\u4e49\u5b57\u4f53\u652f\u6301\u7684 UNICODE \u5b57\u7b26\u8303\u56f4\u3002\u9ed8\u8ba4\u662f &quot;U+0-10FFFF&quot;\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u8f6c\u6362<\/h3>\n<h4>2D\u8f6c\u6362<\/h4>\n<ul>\n<li>translate()<\/li>\n<li>rotate()<\/li>\n<li>scale()<\/li>\n<li>skew()<\/li>\n<li>matrix()<\/li>\n<\/ul>\n<h5>translate()<\/h5>\n<pre><code class=\"language-css\">\/*\u53f350px,\u4e0b100px*\/\ntransform: translate(50px, 100px);\n<\/code><\/pre>\n<h5>rotate()<\/h5>\n<pre><code class=\"language-css\">\/*\u987a\u65f6\u9488\u65cb\u8f6c30\u5ea6*\/\ntransform: rotate(30deg);\n<\/code><\/pre>\n<h5>scale()<\/h5>\n<pre><code class=\"language-css\">\/*\u5bbd*2\uff0c\u9ad8*3*\/\ntransform: scale(2, 3);\n<\/code><\/pre>\n<h5>skew()<\/h5>\n<pre><code class=\"language-css\">\/*x\u65b9\u5411\u4e0a\u626d\u66f230\u5ea6\uff0cy\u65b9\u5411\u4e0a\u626d\u66f220\u5ea6*\/\ntransform: skew(30deg, 20deg);\n<\/code><\/pre>\n<h5>matrix()<\/h5>\n<p>\u4e09\u5408\u4e00\uff08\u65e0rotate\uff09<\/p>\n<pre><code class=\"language-css\">transform: matrix(scaleX,skewY,skewX,scaleY,translateX,translateY)\n<\/code><\/pre>\n<table>\n<thead>\n<tr>\n<th>\u51fd\u6570<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>matrix(<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u8f6c\u6362\uff0c\u4f7f\u7528\u516d\u4e2a\u503c\u7684\u77e9\u9635\u3002<\/td>\n<\/tr>\n<tr>\n<td>translate(<em>x<\/em>,<em>y<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u8f6c\u6362\uff0c\u6cbf\u7740 X \u548c Y \u8f74\u79fb\u52a8\u5143\u7d20\u3002<\/td>\n<\/tr>\n<tr>\n<td>translateX(<em>n<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u8f6c\u6362\uff0c\u6cbf\u7740 X \u8f74\u79fb\u52a8\u5143\u7d20\u3002<\/td>\n<\/tr>\n<tr>\n<td>translateY(<em>n<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u8f6c\u6362\uff0c\u6cbf\u7740 Y \u8f74\u79fb\u52a8\u5143\u7d20\u3002<\/td>\n<\/tr>\n<tr>\n<td>scale(<em>x<\/em>,<em>y<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u7f29\u653e\u8f6c\u6362\uff0c\u6539\u53d8\u5143\u7d20\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td>scaleX(<em>n<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u7f29\u653e\u8f6c\u6362\uff0c\u6539\u53d8\u5143\u7d20\u7684\u5bbd\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td>scaleY(<em>n<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u7f29\u653e\u8f6c\u6362\uff0c\u6539\u53d8\u5143\u7d20\u7684\u9ad8\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td>rotate(<em>angle<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u65cb\u8f6c\uff0c\u5728\u53c2\u6570\u4e2d\u89c4\u5b9a\u89d2\u5ea6\u3002<\/td>\n<\/tr>\n<tr>\n<td>skew(<em>x-angle<\/em>,<em>y-angle<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u503e\u659c\u8f6c\u6362\uff0c\u6cbf\u7740 X \u548c Y \u8f74\u3002<\/td>\n<\/tr>\n<tr>\n<td>skewX(<em>angle<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u503e\u659c\u8f6c\u6362\uff0c\u6cbf\u7740 X \u8f74\u3002<\/td>\n<\/tr>\n<tr>\n<td>skewY(<em>angle<\/em>)<\/td>\n<td>\u5b9a\u4e49 2D \u503e\u659c\u8f6c\u6362\uff0c\u6cbf\u7740 Y \u8f74\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">Property<\/th>\n<th style=\"text-align:left\">\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-transform.html\">transform<\/a><\/td>\n<td style=\"text-align:left\">\u9002\u7528\u4e8e2D\u62163D\u8f6c\u6362\u7684\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-transform-origin.html\">transform-origin<\/a><\/td>\n<td style=\"text-align:left\">\u5141\u8bb8\u60a8\u66f4\u6539\u8f6c\u5316\u5143\u7d20\u4f4d\u7f6e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>3D\u8f6c\u6362<\/h4>\n<h5>rotateX()<\/h5>\n<pre><code class=\"language-css\">\/*\u7ed5x\u8f743d\u65cb\u8f6c*\/\ntransform: rotateX(120deg);\n<\/code><\/pre>\n<h5>rotateY()<\/h5>\n<pre><code class=\"language-css\">\/*\u7ed5y\u8f743d\u65cb\u8f6c*\/\ntransform: rotateY(120deg);\n<\/code><\/pre>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-transform.html\" title=\"CSS3 transform \u5c5e\u6027\">transform<\/a><\/td>\n<td>\u5411\u5143\u7d20\u5e94\u7528 2D \u6216 3D \u8f6c\u6362\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-transform-origin.html\" title=\"CSS3 transform-origin \u5c5e\u6027\">transform-origin<\/a><\/td>\n<td>\u5141\u8bb8\u4f60\u6539\u53d8\u88ab\u8f6c\u6362\u5143\u7d20\u7684\u4f4d\u7f6e\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-transform-style.html\" title=\"CSS3 transform-style \u5c5e\u6027\">transform-style<\/a><\/td>\n<td>\u89c4\u5b9a\u88ab\u5d4c\u5957\u5143\u7d20\u5982\u4f55\u5728 3D \u7a7a\u95f4\u4e2d\u663e\u793a\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-perspective.html\" title=\"CSS3 perspective \u5c5e\u6027\">perspective<\/a><\/td>\n<td>\u89c4\u5b9a 3D \u5143\u7d20\u7684\u900f\u89c6\u6548\u679c\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-perspective-origin.html\" title=\"CSS3 perspective-origin \u5c5e\u6027\">perspective-origin<\/a><\/td>\n<td>\u89c4\u5b9a 3D \u5143\u7d20\u7684\u5e95\u90e8\u4f4d\u7f6e\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-backface-visibility.html\" title=\"CSS3 backface-visibility \u5c5e\u6027\">backface-visibility<\/a><\/td>\n<td>\u5b9a\u4e49\u5143\u7d20\u5728\u4e0d\u9762\u5bf9\u5c4f\u5e55\u65f6\u662f\u5426\u53ef\u89c1\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th>\u51fd\u6570<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>matrix3d(<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,  &lt;br&gt;<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>,<em>n<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u8f6c\u6362\uff0c\u4f7f\u7528 16 \u4e2a\u503c\u7684 4x4 \u77e9\u9635\u3002<\/td>\n<\/tr>\n<tr>\n<td>translate3d(<em>x<\/em>,<em>y<\/em>,<em>z<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u8f6c\u5316\u3002<\/td>\n<\/tr>\n<tr>\n<td>translateX(<em>x<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u8f6c\u5316\uff0c\u4ec5\u4f7f\u7528\u7528\u4e8e X \u8f74\u7684\u503c\u3002<\/td>\n<\/tr>\n<tr>\n<td>translateY(<em>y<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u8f6c\u5316\uff0c\u4ec5\u4f7f\u7528\u7528\u4e8e Y \u8f74\u7684\u503c\u3002<\/td>\n<\/tr>\n<tr>\n<td>translateZ(<em>z<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u8f6c\u5316\uff0c\u4ec5\u4f7f\u7528\u7528\u4e8e Z \u8f74\u7684\u503c\u3002<\/td>\n<\/tr>\n<tr>\n<td>scale3d(<em>x<\/em>,<em>y<\/em>,<em>z<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u7f29\u653e\u8f6c\u6362\u3002<\/td>\n<\/tr>\n<tr>\n<td>scaleX(<em>x<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u7f29\u653e\u8f6c\u6362\uff0c\u901a\u8fc7\u7ed9\u5b9a\u4e00\u4e2a X \u8f74\u7684\u503c\u3002<\/td>\n<\/tr>\n<tr>\n<td>scaleY(<em>y<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u7f29\u653e\u8f6c\u6362\uff0c\u901a\u8fc7\u7ed9\u5b9a\u4e00\u4e2a Y \u8f74\u7684\u503c\u3002<\/td>\n<\/tr>\n<tr>\n<td>scaleZ(<em>z<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u7f29\u653e\u8f6c\u6362\uff0c\u901a\u8fc7\u7ed9\u5b9a\u4e00\u4e2a Z \u8f74\u7684\u503c\u3002<\/td>\n<\/tr>\n<tr>\n<td>rotate3d(<em>x<\/em>,<em>y<\/em>,<em>z<\/em>,<em>angle<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u65cb\u8f6c\u3002<\/td>\n<\/tr>\n<tr>\n<td>rotateX(<em>angle<\/em>)<\/td>\n<td>\u5b9a\u4e49\u6cbf X \u8f74\u7684 3D \u65cb\u8f6c\u3002<\/td>\n<\/tr>\n<tr>\n<td>rotateY(<em>angle<\/em>)<\/td>\n<td>\u5b9a\u4e49\u6cbf Y \u8f74\u7684 3D \u65cb\u8f6c\u3002<\/td>\n<\/tr>\n<tr>\n<td>rotateZ(<em>angle<\/em>)<\/td>\n<td>\u5b9a\u4e49\u6cbf Z \u8f74\u7684 3D \u65cb\u8f6c\u3002<\/td>\n<\/tr>\n<tr>\n<td>perspective(<em>n<\/em>)<\/td>\n<td>\u5b9a\u4e49 3D \u8f6c\u6362\u5143\u7d20\u7684\u900f\u89c6\u89c6\u56fe\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u8fc7\u6e21<\/h3>\n<pre><code class=\"language-css\">\/*transition: \u5c5e\u6027\uff0c\u65f6\u95f4\uff0c\u65f6\u95f4\u66f2\u7ebf\uff0c\u5ef6\u8fdf*\/\ntransition: width 2s, height 2s, transform 2s;\n<\/code><\/pre>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-transition.html\" title=\"CSS3 transition \u5c5e\u6027\">transition<\/a><\/td>\n<td>\u7b80\u5199\u5c5e\u6027\uff0c\u7528\u4e8e\u5728\u4e00\u4e2a\u5c5e\u6027\u4e2d\u8bbe\u7f6e\u56db\u4e2a\u8fc7\u6e21\u5c5e\u6027\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-transition-property.html\" title=\"CSS3 transition-property \u5c5e\u6027\">transition-property<\/a><\/td>\n<td>\u89c4\u5b9a\u5e94\u7528\u8fc7\u6e21\u7684 CSS \u5c5e\u6027\u7684\u540d\u79f0\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-transition-duration.html\" title=\"CSS3 transition-duration \u5c5e\u6027\">transition-duration<\/a><\/td>\n<td>\u5b9a\u4e49\u8fc7\u6e21\u6548\u679c\u82b1\u8d39\u7684\u65f6\u95f4\u3002\u9ed8\u8ba4\u662f 0\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-transition-timing-function.html\" title=\"CSS3 transition-timing-function \u5c5e\u6027\">transition-timing-function<\/a><\/td>\n<td>\u89c4\u5b9a\u8fc7\u6e21\u6548\u679c\u7684\u65f6\u95f4\u66f2\u7ebf\u3002\u9ed8\u8ba4\u662f &quot;ease&quot;\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-transition-delay.html\" title=\"CSS3 transition-delay \u5c5e\u6027\">transition-delay<\/a><\/td>\n<td>\u89c4\u5b9a\u8fc7\u6e21\u6548\u679c\u4f55\u65f6\u5f00\u59cb\u3002\u9ed8\u8ba4\u662f 0\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u52a8\u753b<\/h3>\n<pre><code class=\"language-css\">@keyframes name {\n\tfrom == 0% {\n\t\t\n\t}\n\tto == 100% {\n\t\t\n\t}\n\tany% {\n\t\n\t}\n}\ndiv {\n\tanimation: name 5s;\n}\n<\/code><\/pre>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-animation-keyframes.html\" title=\"CSS3 @keyframes \u89c4\u5219\">@keyframes<\/a><\/td>\n<td>\u89c4\u5b9a\u52a8\u753b\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-animation.html\" title=\"CSS3 animation \u5c5e\u6027\">animation<\/a><\/td>\n<td>\u6240\u6709\u52a8\u753b\u5c5e\u6027\u7684\u7b80\u5199\u5c5e\u6027\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-animation-name.html\" title=\"CSS3 animation-name \u5c5e\u6027\">animation-name<\/a><\/td>\n<td>\u89c4\u5b9a @keyframes \u52a8\u753b\u7684\u540d\u79f0\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-animation-duration.html\" title=\"CSS3 animation-duration \u5c5e\u6027\">animation-duration<\/a><\/td>\n<td>\u89c4\u5b9a\u52a8\u753b\u5b8c\u6210\u4e00\u4e2a\u5468\u671f\u6240\u82b1\u8d39\u7684\u79d2\u6216\u6beb\u79d2\u3002\u9ed8\u8ba4\u662f 0\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-animation-timing-function.html\" title=\"CSS3 animation-timing-function \u5c5e\u6027\">animation-timing-function<\/a><\/td>\n<td>\u89c4\u5b9a\u52a8\u753b\u7684\u901f\u5ea6\u66f2\u7ebf\u3002\u9ed8\u8ba4\u662f &quot;ease&quot;\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-animation-fill-mode.html\" title=\"CSS3 animation-fill-mode \u5c5e\u6027\">animation-fill-mode<\/a><\/td>\n<td>\u89c4\u5b9a\u5f53\u52a8\u753b\u4e0d\u64ad\u653e\u65f6\uff08\u5f53\u52a8\u753b\u5b8c\u6210\u65f6\uff0c\u6216\u5f53\u52a8\u753b\u6709\u4e00\u4e2a\u5ef6\u8fdf\u672a\u5f00\u59cb\u64ad\u653e\u65f6\uff09\uff0c\u8981\u5e94\u7528\u5230\u5143\u7d20\u7684\u6837\u5f0f\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-animation-delay.html\" title=\"CSS3 animation-delay \u5c5e\u6027\">animation-delay<\/a><\/td>\n<td>\u89c4\u5b9a\u52a8\u753b\u4f55\u65f6\u5f00\u59cb\u3002\u9ed8\u8ba4\u662f 0\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-animation-iteration-count.html\" title=\"CSS3 animation-iteration-count \u5c5e\u6027\">animation-iteration-count<\/a><\/td>\n<td>\u89c4\u5b9a\u52a8\u753b\u88ab\u64ad\u653e\u7684\u6b21\u6570\u3002\u9ed8\u8ba4\u662f 1\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-animation-direction.html\" title=\"CSS3 animation-direction \u5c5e\u6027\">animation-direction<\/a><\/td>\n<td>\u89c4\u5b9a\u52a8\u753b\u662f\u5426\u5728\u4e0b\u4e00\u5468\u671f\u9006\u5411\u5730\u64ad\u653e\u3002\u9ed8\u8ba4\u662f &quot;normal&quot;\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-animation-play-state.html\" title=\"CSS3 animation-play-state \u5c5e\u6027\">animation-play-state<\/a><\/td>\n<td>\u89c4\u5b9a\u52a8\u753b\u662f\u5426\u6b63\u5728\u8fd0\u884c\u6216\u6682\u505c\u3002\u9ed8\u8ba4\u662f &quot;running&quot;\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u591a\u5217<\/h3>\n<pre><code class=\"language-css\">div {\n\tcolumn-count: 3;\n\tcolumn-gap: 40px;\n\t\/*\u5217\u8fb9\u6846*\/\n\tcolumn-rule-style: solid;\n\tcolumn-rule-width: 1px;\n}\nh2 {\n\t\/*\u6307\u5b9a\u5143\u7d20\u8de8\u5217*\/\n\tcolumn-span: all;\n}\n<\/code><\/pre>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-column-count.html\">column-count<\/a><\/td>\n<td>\u6307\u5b9a\u5143\u7d20\u5e94\u8be5\u88ab\u5206\u5272\u7684\u5217\u6570\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-column-fill.html\">column-fill<\/a><\/td>\n<td>\u6307\u5b9a\u5982\u4f55\u586b\u5145\u5217<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-column-gap.html\">column-gap<\/a><\/td>\n<td>\u6307\u5b9a\u5217\u4e0e\u5217\u4e4b\u95f4\u7684\u95f4\u9699<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-column-rule.html\">column-rule<\/a><\/td>\n<td>\u6240\u6709 column-rule-* \u5c5e\u6027\u7684\u7b80\u5199<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-column-rule-color.html\">column-rule-color<\/a><\/td>\n<td>\u6307\u5b9a\u4e24\u5217\u95f4\u8fb9\u6846\u7684\u989c\u8272<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-column-rule-style.html\">column-rule-style<\/a><\/td>\n<td>\u6307\u5b9a\u4e24\u5217\u95f4\u8fb9\u6846\u7684\u6837\u5f0f<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-column-rule-width.html\">column-rule-width<\/a><\/td>\n<td>\u6307\u5b9a\u4e24\u5217\u95f4\u8fb9\u6846\u7684\u539a\u5ea6<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-column-span.html\">column-span<\/a><\/td>\n<td>\u6307\u5b9a\u5143\u7d20\u8981\u8de8\u8d8a\u591a\u5c11\u5217<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-column-width.html\">column-width<\/a><\/td>\n<td>\u6307\u5b9a\u5217\u7684\u5bbd\u5ea6<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-columns.html\">columns<\/a><\/td>\n<td>column-width \u4e0e column-count \u7684\u7b80\u5199\u5c5e\u6027\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u7528\u6237\u754c\u9762<\/h3>\n<h4>Resizing<\/h4>\n<pre><code class=\"language-css\">div {\n\t\/*\u7528\u6237\u53ef\u4ee5\u8c03\u6574\u5927\u5c0f*\/\n\tresize: both;\n\toverflow:auto;\n}\n<\/code><\/pre>\n<p>\u4f8b\uff1a<br \/>\n&lt;div style = &quot;resize: both; overflow: auto; border: 1px solid&quot;&gt;Resizing&lt;\/div&gt;<\/p>\n<h4>Box sizing<\/h4>\n<pre><code class=\"language-css\">div {\n\t\/*\u5b9a\u4e49\u5982\u4f55\u8ba1\u7b97\u533a\u57df\u5927\u5c0f*\/\n\t\/*\u9ad8\u5ea6\u548c\u5bbd\u5ea6\u5e94\u7528\u4e8e\u5143\u7d20\u7684\u6240\u6709\u90e8\u5206: \u5185\u5bb9\u3001\u5185\u8fb9\u8ddd\u548c\u8fb9\u6846:*\/\n\tbox-sizing: border-box;\n\twidth: 50%;\n}\n<\/code><\/pre>\n<h4>Outline offset<\/h4>\n<p>\u8f6e\u5ed3\uff0c\u4e0d\u5360\u7528\u7a7a\u95f4\uff0c\u4e0d\u4e00\u5b9a\u662f\u77e9\u5f62<\/p>\n<pre><code class=\"language-css\">div {\n\toutline: 2px solid red;\n\toutline-offset: 15px;\n}\n<\/code><\/pre>\n<p>&lt;div style=&quot;border: 2px solid; outline: 2px solid red; outline-offset: -10px&quot;&gt;Outline offset&lt;\/div&gt;<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">\u5c5e\u6027<\/th>\n<th style=\"text-align:left\">\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-appearance.html\">appearance<\/a><\/td>\n<td style=\"text-align:left\">\u5141\u8bb8\u60a8\u4f7f\u4e00\u4e2a\u5143\u7d20\u7684\u5916\u89c2\u50cf\u4e00\u4e2a\u6807\u51c6\u7684\u7528\u6237\u754c\u9762\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-box-sizing.html\">box-sizing<\/a><\/td>\n<td style=\"text-align:left\">\u5141\u8bb8\u4f60\u4ee5\u9002\u5e94\u533a\u57df\u800c\u7528\u67d0\u79cd\u65b9\u5f0f\u5b9a\u4e49\u67d0\u4e9b\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-icon.html\">icon<\/a><\/td>\n<td style=\"text-align:left\">\u4e3a\u521b\u4f5c\u8005\u63d0\u4f9b\u4e86\u5c06\u5143\u7d20\u8bbe\u7f6e\u4e3a\u56fe\u6807\u7b49\u4ef7\u7269\u7684\u80fd\u529b\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-nav-down.html\">nav-down<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u5728\u4f55\u5904\u4f7f\u7528\u7bad\u5934\u5411\u4e0b\u5bfc\u822a\u952e\u65f6\u8fdb\u884c\u5bfc\u822a<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-nav-index.html\">nav-index<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u4e00\u4e2a\u5143\u7d20\u7684Tab\u7684\u987a\u5e8f<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-nav-left.html\">nav-left<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u5728\u4f55\u5904\u4f7f\u7528\u5de6\u4fa7\u7684\u7bad\u5934\u5bfc\u822a\u952e\u8fdb\u884c\u5bfc\u822a<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-nav-right.html\">nav-right<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u5728\u4f55\u5904\u4f7f\u7528\u53f3\u4fa7\u7684\u7bad\u5934\u5bfc\u822a\u952e\u8fdb\u884c\u5bfc\u822a<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-nav-up.html\">nav-up<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u5728\u4f55\u5904\u4f7f\u7528\u7bad\u5934\u5411\u4e0a\u5bfc\u822a\u952e\u65f6\u8fdb\u884c\u5bfc\u822a<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-outline-offset.html\">outline-offset<\/a><\/td>\n<td style=\"text-align:left\">\u5916\u8f6e\u5ed3\u4fee\u9970\u5e76\u7ed8\u5236\u8d85\u51fa\u8fb9\u6846\u7684\u8fb9\u7f18<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\"><a href=\"https:\/\/www.runoob.com\/cssref\/css3-pr-resize.html\">resize<\/a><\/td>\n<td style=\"text-align:left\">\u6307\u5b9a\u4e00\u4e2a\u5143\u7d20\u662f\u5426\u662f\u7531\u7528\u6237\u8c03\u6574\u5927\u5c0f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u56fe\u7247<\/h3>\n<pre><code class=\"language-css\">img {\n\t\/*\u54cd\u5e94\u5f0f*\/\n    max-width: 100%;\n    height: auto;\n}\n<\/code><\/pre>\n<pre><code class=\"language-css\">img {\n\t\/*\u6ee4\u955c*\/\n\tfilter\uff1a grayscale(100%);\n}\n<\/code><\/pre>\n<h4>\u6a21\u6001<\/h4>\n","protected":false},"excerpt":{"rendered":"<p>CSS\uff1fCSS3\uff01 CSS Important \u5e03\u5c40\uff08\u76d2\u6a21\u578b\u3001\u5b9a\u4f4d\u3001\u6d6e\u52a8\u3001flex\u7b49\uff09[[First floo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-507","post","type-post","status-publish","format-standard","hentry","category-front-end"],"_links":{"self":[{"href":"https:\/\/levin.ink\/index.php?rest_route=\/wp\/v2\/posts\/507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/levin.ink\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/levin.ink\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/levin.ink\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/levin.ink\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=507"}],"version-history":[{"count":4,"href":"https:\/\/levin.ink\/index.php?rest_route=\/wp\/v2\/posts\/507\/revisions"}],"predecessor-version":[{"id":646,"href":"https:\/\/levin.ink\/index.php?rest_route=\/wp\/v2\/posts\/507\/revisions\/646"}],"wp:attachment":[{"href":"https:\/\/levin.ink\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/levin.ink\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/levin.ink\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}