{"id":779,"date":"2018-02-25T20:40:36","date_gmt":"2018-02-25T12:40:36","guid":{"rendered":"http:\/\/60.205.208.74\/2018\/02\/25\/css-%e4%bc%aa%e7%b1%bb\/"},"modified":"2018-02-25T20:40:36","modified_gmt":"2018-02-25T12:40:36","slug":"css-%e4%bc%aa%e7%b1%bb","status":"publish","type":"post","link":"https:\/\/www.puzi7.net\/?p=779","title":{"rendered":"CSS \u4f2a\u7c7b"},"content":{"rendered":"<span itemprop=\"description\"><div class=\"article-body\">\n<div class=\"article-intro\" id=\"content\">\n<h1>CSS <span class=\"color_h1\">\u4f2a\u7c7b(Pseudo-classes)<\/span><br \/>\n<\/h1>\n<hr>\n<p class=\"intro\">CSS\u4f2a\u7c7b\u662f\u7528\u6765\u6dfb\u52a0\u4e00\u4e9b\u9009\u62e9\u5668\u7684\u7279\u6b8a\u6548\u679c\u3002<\/p>\n<hr>\n<h2>\u8bed\u6cd5<\/h2>\n<p>\u4f2a\u7c7b\u7684\u8bed\u6cd5\uff1a<\/p>\n<div class=\"code\">\n<div>\nselector:pseudo-class {property:value;}<\/div>\n<\/div>\n<p>CSS\u7c7b\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4f2a\u7c7b\uff1a<\/p>\n<div class=\"code\">\n<div>\nselector.class:pseudo-class {property:value;}<\/div>\n<\/div>\n<p><\/p>\n<hr>\n<h2>anchor\u4f2a\u7c7b<\/h2>\n<p>\u5728\u652f\u6301 CSS \u7684\u6d4f\u89c8\u5668\u4e2d\uff0c\u94fe\u63a5\u7684\u4e0d\u540c\u72b6\u6001\u90fd\u53ef\u4ee5\u4ee5\u4e0d\u540c\u7684\u65b9\u5f0f\u663e\u793a<\/p>\n<div class=\"example\">\n<h2 class=\"example\">\u5b9e\u4f8b<\/h2>\n<div class=\"example_code\">\n<div class=\"hl-main\"><span class=\"hl-identifier\">a<\/span><span class=\"hl-special\">:link<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-brackets\">{<\/span><span class=\"hl-reserved\">color:<\/span><span class=\"hl-var\">#FF0000<\/span><span class=\"hl-reserved\"><\/span><span class=\"hl-code\">;<\/span><span class=\"hl-brackets\">}<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-comment\">\/*<\/span><span class=\"hl-comment\"> \u672a\u8bbf\u95ee\u7684\u94fe\u63a5 <\/span><span class=\"hl-comment\">*\/<\/span><span class=\"hl-code\"><br \/>\n<\/span><span class=\"hl-identifier\">a<\/span><span class=\"hl-special\">:visited<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-brackets\">{<\/span><span class=\"hl-reserved\">color:<\/span><span class=\"hl-var\">#00FF00<\/span><span class=\"hl-reserved\"><\/span><span class=\"hl-code\">;<\/span><span class=\"hl-brackets\">}<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-comment\">\/*<\/span><span class=\"hl-comment\"> \u5df2\u8bbf\u95ee\u7684\u94fe\u63a5 <\/span><span class=\"hl-comment\">*\/<\/span><span class=\"hl-code\"><br \/>\n<\/span><span class=\"hl-identifier\">a<\/span><span class=\"hl-special\">:hover<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-brackets\">{<\/span><span class=\"hl-reserved\">color:<\/span><span class=\"hl-var\">#FF00FF<\/span><span class=\"hl-reserved\"><\/span><span class=\"hl-code\">;<\/span><span class=\"hl-brackets\">}<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-comment\">\/*<\/span><span class=\"hl-comment\"> \u9f20\u6807\u5212\u8fc7\u94fe\u63a5 <\/span><span class=\"hl-comment\">*\/<\/span><span class=\"hl-code\"><br \/>\n<\/span><span class=\"hl-identifier\">a<\/span><span class=\"hl-special\">:active<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-brackets\">{<\/span><span class=\"hl-reserved\">color:<\/span><span class=\"hl-var\">#0000FF<\/span><span class=\"hl-reserved\"><\/span><span class=\"hl-code\">;<\/span><span class=\"hl-brackets\">}<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-comment\">\/*<\/span><span class=\"hl-comment\"> \u5df2\u9009\u4e2d\u7684\u94fe\u63a5 <\/span><span class=\"hl-comment\">*\/<\/span><\/div>\n<\/div>\n<\/div>\n<p><b>\u6ce8\u610f\uff1a<\/b> \u5728CSS\u5b9a\u4e49\u4e2d\uff0ca:hover \u5fc5\u987b\u88ab\u7f6e\u4e8e a:link \u548c a:visited \u4e4b\u540e\uff0c\u624d\u662f\u6709\u6548\u7684\u3002<\/p>\n<p><b>\u6ce8\u610f\uff1a<\/b> \u5728 CSS \u5b9a\u4e49\u4e2d\uff0ca:active \u5fc5\u987b\u88ab\u7f6e\u4e8e a:hover \u4e4b\u540e\uff0c\u624d\u662f\u6709\u6548\u7684\u3002<\/p>\n<p><b>\u6ce8\u610f\uff1a<\/b>\u4f2a\u7c7b\u7684\u540d\u79f0\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u3002<\/p>\n<hr>\n<h2>\u4f2a\u7c7b\u548cCSS\u7c7b<\/h2>\n<p>\u4f2a\u7c7b\u53ef\u4ee5\u4e0e CSS \u7c7b\u914d\u5408\u4f7f\u7528\uff1a<\/p>\n<div class=\"example\">\n<div class=\"example_code\">\n<div class=\"hl-main\"><span class=\"hl-identifier\">a<\/span><span class=\"hl-identifier\">.red<\/span><span class=\"hl-special\">:visited<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-brackets\">{<\/span><span class=\"hl-reserved\">color:<\/span><span class=\"hl-var\">#FF0000<\/span><span class=\"hl-reserved\"><\/span><span class=\"hl-code\">;<\/span><span class=\"hl-brackets\">}<\/span><span class=\"hl-code\"><\/p>\n<p>&lt;<\/span><span class=\"hl-identifier\">a<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-identifier\">class<\/span><span class=\"hl-code\">=&#8221;<\/span><span class=\"hl-identifier\">red<\/span><span class=\"hl-code\">&#8221; <\/span><span class=\"hl-identifier\">href<\/span><span class=\"hl-code\">=&#8221;<\/span><span class=\"hl-identifier\">css-syntax<\/span><span class=\"hl-identifier\">.html<\/span><span class=\"hl-code\">&#8220;&gt;<\/span><span class=\"hl-identifier\">CSS<\/span><span class=\"hl-code\"> \u8bed\u6cd5&lt;\/<\/span><span class=\"hl-identifier\">a<\/span><span class=\"hl-code\">&gt;<\/span><\/div>\n<\/div>\n<\/div>\n<p>\u5982\u679c\u5728\u4e0a\u9762\u7684\u4f8b\u5b50\u7684\u94fe\u63a5\u5df2\u88ab\u8bbf\u95ee\uff0c\u5b83\u4f1a\u663e\u793a\u4e3a\u7ea2\u8272\u3002<\/p>\n<hr>\n<h2>CSS &#8211; :first &#8211; child\u4f2a\u7c7b<\/h2>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528 :first-child \u4f2a\u7c7b\u6765\u9009\u62e9\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20<\/p>\n<p><b>\u6ce8\u610f\uff1a<\/b>\u5728IE8\u7684\u4e4b\u524d\u7248\u672c\u5fc5\u987b\u58f0\u660e<a href=\"\/tags\/tag-doctype.html\">&lt;!DOCTYPE&gt;<\/a> \uff0c\u8fd9\u6837 :first-child \u624d\u80fd\u751f\u6548\u3002<\/p>\n<h2>\u5339\u914d\u7b2c\u4e00\u4e2a &lt;p&gt; \u5143\u7d20<\/h2>\n<p>\u5728\u4e0b\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u9009\u62e9\u5668\u5339\u914d\u4f5c\u4e3a\u4efb\u4f55\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20\u7684 &lt;p&gt; \u5143\u7d20\uff1a<\/p>\n<div class=\"example\">\n<h2 class=\"example\">\u5b9e\u4f8b<\/h2>\n<div class=\"example_code\">\n<div class=\"hl-main\"><span class=\"hl-identifier\">p<\/span><span class=\"hl-special\">:first-child<\/span><span class=\"hl-code\"><br \/>\n<\/span><span class=\"hl-brackets\">{<\/span><span class=\"hl-code\"><br \/>\n    <\/span><span class=\"hl-reserved\">color:<\/span><span class=\"hl-var\">blue<\/span><span class=\"hl-reserved\"><\/span><span class=\"hl-code\">;<br \/>\n<\/span><span class=\"hl-brackets\">}<\/span><\/div>\n<\/div>\n<p>\n<\/div>\n<hr>\n<h2>\u5339\u914d\u6240\u6709&lt;p&gt; \u5143\u7d20\u4e2d\u7684\u7b2c\u4e00\u4e2a &lt;i&gt; \u5143\u7d20<\/h2>\n<p>\u5728\u4e0b\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u9009\u62e9\u76f8\u5339\u914d\u7684\u6240\u6709&lt;p&gt;\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a  &lt;i&gt; \u5143\u7d20\uff1a<\/p>\n<div class=\"example\">\n<h2 class=\"example\">\u5b9e\u4f8b<\/h2>\n<div class=\"example_code\">\n<div class=\"hl-main\"><span class=\"hl-identifier\">p<\/span><span class=\"hl-code\"> &gt; <\/span><span class=\"hl-identifier\">i<\/span><span class=\"hl-special\">:first-child<\/span><span class=\"hl-code\"><br \/>\n<\/span><span class=\"hl-brackets\">{<\/span><span class=\"hl-code\"><br \/>\n    <\/span><span class=\"hl-reserved\">color:<\/span><span class=\"hl-var\">blue<\/span><span class=\"hl-reserved\"><\/span><span class=\"hl-code\">;<br \/>\n<\/span><span class=\"hl-brackets\">}<\/span><\/div>\n<\/div>\n<p>\n<\/div>\n<hr>\n<h2>\u5339\u914d\u6240\u6709\u4f5c\u4e3a\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20\u7684 &lt;p&gt; \u5143\u7d20\u4e2d\u7684\u6240\u6709 &lt;i&gt; \u5143\u7d20<\/h2>\n<p>\u5728\u4e0b\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u9009\u62e9\u5668\u5339\u914d\u6240\u6709\u4f5c\u4e3a\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20\u7684 &lt;p&gt; \u5143\u7d20\u4e2d\u7684\u6240\u6709 &lt;i&gt; \u5143\u7d20\uff1a<\/p>\n<div class=\"example\">\n<h2 class=\"example\">\u5b9e\u4f8b<\/h2>\n<div class=\"example_code\">\n<div class=\"hl-main\"><span class=\"hl-identifier\">p<\/span><span class=\"hl-special\">:first-child<\/span><span class=\"hl-code\"> <\/span><span class=\"hl-identifier\">i<\/span><span class=\"hl-code\"><br \/>\n<\/span><span class=\"hl-brackets\">{<\/span><span class=\"hl-code\"><br \/>\n    <\/span><span class=\"hl-reserved\">color:<\/span><span class=\"hl-var\">blue<\/span><span class=\"hl-reserved\"><\/span><span class=\"hl-code\">;<br \/>\n<\/span><span class=\"hl-brackets\">}<\/span><\/div>\n<\/div>\n<p>\n<\/div>\n<hr>\n<h2>CSS &#8211; :lang \u4f2a\u7c7b<\/h2>\n<p>:lang \u4f2a\u7c7b\u4f7f\u4f60\u6709\u80fd\u529b\u4e3a\u4e0d\u540c\u7684\u8bed\u8a00\u5b9a\u4e49\u7279\u6b8a\u7684\u89c4\u5219<\/p>\n<p><b>\u6ce8\u610f\uff1a<\/b>IE8\u5fc5\u987b\u58f0\u660e<a href=\"\/tags\/tag-doctype.html\">&lt;!DOCTYPE&gt;<\/a>\u624d\u80fd\u652f\u6301;lang\u4f2a\u7c7b\u3002<\/p>\n<p>\u5728\u4e0b\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c:lang \u7c7b\u4e3a\u5c5e\u6027\u503c\u4e3a no \u7684q\u5143\u7d20\u5b9a\u4e49\u5f15\u53f7\u7684\u7c7b\u578b\uff1a<\/p>\n<div class=\"example\">\n<h2 class=\"example\">\u5b9e\u4f8b<\/h2>\n<div class=\"example_code\">\n<div class=\"hl-main\"><span class=\"hl-identifier\">q<\/span><span class=\"hl-special\">:lang<\/span><span class=\"hl-code\">(<\/span><span class=\"hl-identifier\">no<\/span><span class=\"hl-code\">) <\/span><span class=\"hl-brackets\">{<\/span><span class=\"hl-reserved\">quotes:<\/span><span class=\"hl-code\"> &#8220;~&#8221; &#8220;~&#8221;<\/span><span class=\"hl-reserved\"><\/span><span class=\"hl-code\">;<\/span><span class=\"hl-brackets\">}<\/span><\/div>\n<\/div>\n<p><\/p>\n<\/div>\n<p><\/p>\n<hr>\n<div class=\"tryit_ex\">\n<img decoding=\"async\" src=\"\/images\/tryitimg.gif\" width=\"40\" height=\"46px\" alt=\"Examples\"><\/p>\n<h2>\u66f4\u591a\u5b9e\u4f8b<\/h2>\n<\/div>\n<p>\n\u8fd9\u4e2a\u4f8b\u5b50\u6f14\u793a\u4e86\u5982\u4f55\u4e3a\u8d85\u94fe\u63a5\u6dfb\u52a0\u5176\u4ed6\u6837\u5f0f\u3002<\/p>\n<p>\n\u8fd9\u4e2a\u4f8b\u5b50\u6f14\u793a\u4e86\u5982\u4f55\u4f7f\u7528 :focus\u4f2a\u7c7b\u3002 <\/p>\n<hr>\n<h2>\u6240\u6709CSS\u4f2a\u7c7b\/\u5143\u7d20<\/h2>\n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"1\" id=\"table13\" class=\"reference\">\n<tbody>\n<tr>\n<th width=\"20%\" align=\"left\">\u9009\u62e9\u5668<\/th>\n<th width=\"17%\" align=\"left\">\u793a\u4f8b<\/th>\n<th width=\"63%\" align=\"left\">\u793a\u4f8b\u8bf4\u660e<\/th>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-checked.html\">:checked<\/a><\/td>\n<td>input:checked<\/td>\n<td>\u9009\u62e9\u6240\u6709\u9009\u4e2d\u7684\u8868\u5355\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-disabled.html\">:disabled<\/a><\/td>\n<td>input:disabled<\/td>\n<td>\u9009\u62e9\u6240\u6709\u7981\u7528\u7684\u8868\u5355\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-empty.html\">:empty<\/a><\/td>\n<td>p:empty<\/td>\n<td>\u9009\u62e9\u6240\u6709\u6ca1\u6709\u5b50\u5143\u7d20\u7684p\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-enable.html\">:enabled<\/a><\/td>\n<td>input:enabled<\/td>\n<td>\u9009\u62e9\u6240\u6709\u542f\u7528\u7684\u8868\u5355\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-first-of-type.html\">:first-of-type<\/a><\/td>\n<td>p:first-of-type<\/td>\n<td>\u9009\u62e9\u6bcf\u4e2a\u7236\u5143\u7d20\u662fp\u5143\u7d20\u7684\u7b2c\u4e00\u4e2ap\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-in-range.html\">:in-range<\/a><\/td>\n<td>input:in-range<\/td>\n<td>\u9009\u62e9\u5143\u7d20\u6307\u5b9a\u8303\u56f4\u5185\u7684\u503c<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-invalid.html\">:invalid<\/a><\/td>\n<td>input:invalid<\/td>\n<td>\u9009\u62e9\u6240\u6709\u65e0\u6548\u7684\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-last-child.html\">:last-child<\/a><\/td>\n<td>p:last-child<\/td>\n<td>\u9009\u62e9\u6240\u6709p\u5143\u7d20\u7684\u6700\u540e\u4e00\u4e2a\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-last-of-type.html\">:last-of-type<\/a><\/td>\n<td>p:last-of-type<\/td>\n<td>\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><a href=\"\/cssref\/sel-not.html\">:not(selector)<\/a><\/td>\n<td>:not(p)<\/td>\n<td>\u9009\u62e9\u6240\u6709p\u4ee5\u5916\u7684\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-nth-child.html\">:nth-child(n)<\/a><\/td>\n<td>p:nth-child(2)<\/td>\n<td>\u9009\u62e9\u6240\u6709p\u5143\u7d20\u7684\u7b2c\u4e8c\u4e2a\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-nth-last-child.html\">:nth-last-child(n)<\/a><\/td>\n<td>p:nth-last-child(2)<\/td>\n<td>\u9009\u62e9\u6240\u6709p\u5143\u7d20\u5012\u6570\u7684\u7b2c\u4e8c\u4e2a\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-nth-last-of-type.html\">:nth-last-of-type(n)<\/a><\/td>\n<td>p:nth-last-of-type(2)<\/td>\n<td>\u9009\u62e9\u6240\u6709p\u5143\u7d20\u5012\u6570\u7684\u7b2c\u4e8c\u4e2a\u4e3ap\u7684\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-nth-of-type.html\">:nth-of-type(n)<\/a><\/td>\n<td>p:nth-of-type(2)<\/td>\n<td>\u9009\u62e9\u6240\u6709p\u5143\u7d20\u7b2c\u4e8c\u4e2a\u4e3ap\u7684\u5b50\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-only-of-type.html\">:only-of-type<\/a><\/td>\n<td>p:only-of-type<\/td>\n<td>\u9009\u62e9\u6240\u6709\u4ec5\u6709\u4e00\u4e2a\u5b50\u5143\u7d20\u4e3ap\u7684\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-only-child.html\">:only-child<\/a><\/td>\n<td>p:only-child<\/td>\n<td>\u9009\u62e9\u6240\u6709\u4ec5\u6709\u4e00\u4e2a\u5b50\u5143\u7d20\u7684p\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-optional.html\">:optional<\/a><\/td>\n<td>input:optional<\/td>\n<td>\u9009\u62e9\u6ca1\u6709&#8221;required&#8221;\u7684\u5143\u7d20\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-out-of-range.html\">:out-of-range<\/a><\/td>\n<td>input:out-of-range<\/td>\n<td>\u9009\u62e9\u6307\u5b9a\u8303\u56f4\u4ee5\u5916\u7684\u503c\u7684\u5143\u7d20\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-read-only.html\">:read-only<\/a><\/td>\n<td>input:read-only<\/td>\n<td>\u9009\u62e9\u53ea\u8bfb\u5c5e\u6027\u7684\u5143\u7d20\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-read-write.html\">:read-write<\/a><\/td>\n<td>input:read-write<\/td>\n<td>\u9009\u62e9\u6ca1\u6709\u53ea\u8bfb\u5c5e\u6027\u7684\u5143\u7d20\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-required.html\">:required<\/a><\/td>\n<td>input:required<\/td>\n<td>\u9009\u62e9\u6709&#8221;required&#8221;\u5c5e\u6027\u6307\u5b9a\u7684\u5143\u7d20\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-root.html\">:root<\/a><\/td>\n<td>root<\/td>\n<td>\u9009\u62e9\u6587\u6863\u7684\u6839\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-target.html\">:target<\/a><\/td>\n<td>#news:target<\/td>\n<td>\u9009\u62e9\u5f53\u524d\u6d3b\u52a8#news\u5143\u7d20(\u70b9\u51fbURL\u5305\u542b\u951a\u7684\u540d\u5b57)<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-valid.html\">:valid<\/a><\/td>\n<td>input:valid<\/td>\n<td>\u9009\u62e9\u6240\u6709\u6709\u6548\u503c\u7684\u5c5e\u6027<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-link.html\">:link<\/a><\/td>\n<td>a:link<\/td>\n<td>\u9009\u62e9\u6240\u6709\u672a\u8bbf\u95ee\u94fe\u63a5<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-visited.html\">:visited<\/a><\/td>\n<td>a:visited<\/td>\n<td>\u9009\u62e9\u6240\u6709\u8bbf\u95ee\u8fc7\u7684\u94fe\u63a5<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-active.html\">:active<\/a><\/td>\n<td>a:active<\/td>\n<td>\u9009\u62e9\u6b63\u5728\u6d3b\u52a8\u94fe\u63a5<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-hover.html\">:hover<\/a><\/td>\n<td>a:hover<\/td>\n<td>\u628a\u9f20\u6807\u653e\u5728\u94fe\u63a5\u4e0a\u7684\u72b6\u6001<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-focus.html\">:focus<\/a><\/td>\n<td>input:focus<\/td>\n<td>\u9009\u62e9\u5143\u7d20\u8f93\u5165\u540e\u5177\u6709\u7126\u70b9<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-firstletter.html\">:first-letter<\/a><\/td>\n<td>p:first-letter<\/td>\n<td>\u9009\u62e9\u6bcf\u4e2a&lt;p&gt; \u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b57\u6bcd<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-firstline.html\">:first-line<\/a><\/td>\n<td>p:first-line<\/td>\n<td>\u9009\u62e9\u6bcf\u4e2a&lt;p&gt; \u5143\u7d20\u7684\u7b2c\u4e00\u884c<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-firstchild.html\">:first-child<\/a><\/td>\n<td>p:first-child<\/td>\n<td>\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><a href=\"\/cssref\/sel-before.html\">:before<\/a><\/td>\n<td>p:before<\/td>\n<td>\u5728\u6bcf\u4e2a&lt;p&gt;\u5143\u7d20\u4e4b\u524d\u63d2\u5165\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-after.html\">:after<\/a><\/td>\n<td>p:after<\/td>\n<td>\u5728\u6bcf\u4e2a&lt;p&gt;\u5143\u7d20\u4e4b\u540e\u63d2\u5165\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/cssref\/sel-lang.html\">:lang(<i>language<\/i>)<\/a><\/td>\n<td>p:lang(it)<\/td>\n<td>\u4e3a&lt;p&gt;\u5143\u7d20\u7684lang\u5c5e\u6027\u9009\u62e9\u4e00\u4e2a\u5f00\u59cb\u503c<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/p><\/div>\n<span>","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\"><span itemprop=\"description\">CSS \u4f2a\u7c7b(Pseudo-classes) CSS\u4f2a\u7c7b\u662f\u7528\u6765\u6dfb\u52a0\u4e00\u4e9b\u9009\u62e9\u5668\u7684\u7279\u6b8a\u6548\u679c\u3002 &hellip;<\/span><\/p>\n<p class=\"more-link-p btn-align-right\"><a class=\"green zoom-btn\" href=\"https:\/\/www.puzi7.net\/?p=779\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,29,7],"tags":[53],"class_list":["post-779","post","type-post","status-publish","format-standard","hentry","category-css","category-frontend","category-basic","tag-css","zoom-theme-has-thumb"],"_links":{"self":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts\/779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=779"}],"version-history":[{"count":0,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=\/wp\/v2\/posts\/779\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.puzi7.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}