{"id":2437,"date":"2023-11-14T11:57:52","date_gmt":"2023-11-14T03:57:52","guid":{"rendered":""},"modified":"2023-11-14T11:57:52","modified_gmt":"2023-11-14T03:57:52","slug":"CSS \u9009\u62e9\u5668\u5217\u8868","status":"publish","type":"post","link":"https:\/\/bianchenghao6.com\/2437.html","title":{"rendered":"CSS \u9009\u62e9\u5668\u5217\u8868"},"content":{"rendered":"
\n

CSS \u9009\u62e9\u5668\u5217\u8868<\/h1>\n<\/div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u9009\u62e9\u5668<\/td>\n\u793a\u4f8b<\/td>\n\u793a\u4f8b\u8bf4\u660e<\/td>\nCSS<\/td>\n<\/tr>\n
.class<\/i><\/td>\n.intro<\/td>\n\u9009\u62e9\u6240\u6709class=\"intro\"\u7684\u5143\u7d20<\/td>\n1<\/td>\n<\/tr>\n
#id<\/i><\/td>\n#firstname<\/td>\n\u9009\u62e9\u6240\u6709id=\"firstname\"\u7684\u5143\u7d20<\/td>\n1<\/td>\n<\/tr>\n
*<\/td>\n*<\/td>\n\u9009\u62e9\u6240\u6709\u5143\u7d20<\/td>\n2<\/td>\n<\/tr>\n
element<\/i><\/td>\np<\/td>\n\u9009\u62e9\u6240\u6709<p>\u5143\u7d20<\/td>\n1<\/td>\n<\/tr>\n
element,element<\/i><\/td>\ndiv,p<\/td>\n\u9009\u62e9\u6240\u6709<div>\u5143\u7d20\u548c<p>\u5143\u7d20<\/td>\n1<\/td>\n<\/tr>\n
element<\/i> element<\/i><\/td>\ndiv p<\/td>\n\u9009\u62e9<div>\u5143\u7d20\u5185\u7684\u6240\u6709<p>\u5143\u7d20<\/td>\n1<\/td>\n<\/tr>\n
element<\/i>>element<\/i><\/td>\ndiv>p<\/td>\n\u9009\u62e9\u6240\u6709\u7236\u7ea7\u662f <div> \u5143\u7d20\u7684 <p> \u5143\u7d20<\/td>\n2<\/td>\n<\/tr>\n
element<\/i>+element<\/i><\/td>\ndiv+p<\/td>\n\u9009\u62e9\u6240\u6709\u7d27\u63a5\u7740<div>\u5143\u7d20\u4e4b\u540e\u7684<p>\u5143\u7d20<\/td>\n2<\/td>\n<\/tr>\n
[attribute<\/i>]<\/td>\n[target]<\/td>\n\u9009\u62e9\u6240\u6709\u5e26\u6709target\u5c5e\u6027\u5143\u7d20<\/td>\n2<\/td>\n<\/tr>\n
[attribute<\/i>=value<\/i>]<\/td>\n[target=-blank]<\/td>\n\u9009\u62e9\u6240\u6709\u4f7f\u7528target=\"-blank\"\u7684\u5143\u7d20<\/td>\n2<\/td>\n<\/tr>\n
[attribute<\/i>~=value<\/i>]<\/td>\n[title~=flower]<\/td>\n\u9009\u62e9\u6807\u9898\u5c5e\u6027\u5305\u542b\u5355\u8bcd\"flower\"\u7684\u6240\u6709\u5143\u7d20<\/td>\n2<\/td>\n<\/tr>\n
[attribute<\/i>|=language<\/i>]<\/td>\n[lang|=en]<\/td>\n\u9009\u62e9 lang \u5c5e\u6027\u4ee5 en \u4e3a\u5f00\u5934\u7684\u6240\u6709\u5143\u7d20<\/td>\n2<\/td>\n<\/tr>\n
:link<\/td>\na:link<\/td>\n\u9009\u62e9\u6240\u6709\u672a\u8bbf\u95ee\u94fe\u63a5<\/td>\n1<\/td>\n<\/tr>\n
:visited<\/td>\na:visited<\/td>\n\u9009\u62e9\u6240\u6709\u8bbf\u95ee\u8fc7\u7684\u94fe\u63a5<\/td>\n1<\/td>\n<\/tr>\n
:active<\/td>\na:active<\/td>\n\u9009\u62e9\u6d3b\u52a8\u94fe\u63a5<\/td>\n1<\/td>\n<\/tr>\n
:hover<\/td>\na:hover<\/td>\n\u9009\u62e9\u9f20\u6807\u5728\u94fe\u63a5\u4e0a\u9762\u65f6<\/td>\n1<\/td>\n<\/tr>\n
:focus<\/td>\ninput:focus<\/td>\n\u9009\u62e9\u5177\u6709\u7126\u70b9\u7684\u8f93\u5165\u5143\u7d20<\/td>\n2<\/td>\n<\/tr>\n
:first-letter<\/td>\np:first-letter<\/td>\n\u9009\u62e9\u6bcf\u4e00\u4e2a<p>\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u5b57\u6bcd<\/td>\n1<\/td>\n<\/tr>\n
:first-line<\/td>\np:first-line<\/td>\n\u9009\u62e9\u6bcf\u4e00\u4e2a<p>\u5143\u7d20\u7684\u7b2c\u4e00\u884c<\/td>\n1<\/td>\n<\/tr>\n
:first-child<\/td>\np:first-child<\/td>\n\u6307\u5b9a\u53ea\u6709\u5f53<p>\u5143\u7d20\u662f\u5176\u7236\u7ea7\u7684\u7b2c\u4e00\u4e2a\u5b50\u7ea7\u7684\u6837\u5f0f\u3002<\/td>\n2<\/td>\n<\/tr>\n
:before<\/td>\np:before<\/td>\n\u5728\u6bcf\u4e2a<p>\u5143\u7d20\u4e4b\u524d\u63d2\u5165\u5185\u5bb9<\/td>\n2<\/td>\n<\/tr>\n
:after<\/td>\np:after<\/td>\n\u5728\u6bcf\u4e2a<p>\u5143\u7d20\u4e4b\u540e\u63d2\u5165\u5185\u5bb9<\/td>\n2<\/td>\n<\/tr>\n
:lang(language<\/i>)<\/td>\np:lang(it)<\/td>\n\u9009\u62e9\u4e00\u4e2alang\u5c5e\u6027\u7684\u8d77\u59cb\u503c=\"it\"\u7684\u6240\u6709<p>\u5143\u7d20<\/td>\n2<\/td>\n<\/tr>\n
element1<\/i>~element2<\/i><\/td>\np~ul<\/td>\n\u9009\u62e9p\u5143\u7d20\u4e4b\u540e\u7684\u6bcf\u4e00\u4e2aul\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
[attribute<\/i>^=value<\/i>]<\/td>\na[src^=\"https\"]<\/td>\n\u9009\u62e9\u6bcf\u4e00\u4e2asrc\u5c5e\u6027\u7684\u503c\u4ee5\"https\"\u5f00\u5934\u7684\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
[attribute<\/i>$=value<\/i>]<\/td>\na[src$=\".pdf\"]<\/td>\n\u9009\u62e9\u6bcf\u4e00\u4e2asrc\u5c5e\u6027\u7684\u503c\u4ee5\".pdf\"\u7ed3\u5c3e\u7684\u5143\u7d20 <\/td>\n3<\/td>\n<\/tr>\n
[attribute<\/i>*=value<\/i>]<\/td>\na[src*=\"runoob\"]<\/td>\n\u9009\u62e9\u6bcf\u4e00\u4e2asrc\u5c5e\u6027\u7684\u503c\u5305\u542b\u5b50\u5b57\u7b26\u4e32\"runoob\"\u7684\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:first-of-type<\/td>\np:first-of-type<\/td>\n\u9009\u62e9\u6bcf\u4e2ap\u5143\u7d20\u662f\u5176\u7236\u7ea7\u7684\u7b2c\u4e00\u4e2ap\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:last-of-type<\/td>\np:last-of-type<\/td>\n\u9009\u62e9\u6bcf\u4e2ap\u5143\u7d20\u662f\u5176\u7236\u7ea7\u7684\u6700\u540e\u4e00\u4e2ap\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:only-of-type<\/td>\np:only-of-type<\/td>\n\u9009\u62e9\u6bcf\u4e2ap\u5143\u7d20\u662f\u5176\u7236\u7ea7\u7684\u552f\u4e00p\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:only-child<\/td>\np:only-child<\/td>\n\u9009\u62e9\u6bcf\u4e2ap\u5143\u7d20\u662f\u5176\u7236\u7ea7\u7684\u552f\u4e00\u5b50\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:nth-child(n<\/i>)<\/td>\np:nth-child(2)<\/td>\n\u9009\u62e9\u6bcf\u4e2ap\u5143\u7d20\u662f\u5176\u7236\u7ea7\u7684\u7b2c\u4e8c\u4e2a\u5b50\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:nth-last-child(n<\/i>)<\/td>\np:nth-last-child(2)<\/td>\n\u9009\u62e9\u6bcf\u4e2ap\u5143\u7d20\u7684\u662f\u5176\u7236\u7ea7\u7684\u7b2c\u4e8c\u4e2a\u5b50\u5143\u7d20\uff0c\u4ece\u6700\u540e\u4e00\u4e2a\u5b50\u9879\u8ba1\u6570<\/td>\n3<\/td>\n<\/tr>\n
:nth-of-type(n<\/i>)<\/td>\np:nth-of-type(2)<\/td>\n\u9009\u62e9\u6bcf\u4e2ap\u5143\u7d20\u662f\u5176\u7236\u7ea7\u7684\u7b2c\u4e8c\u4e2ap\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:nth-last-of-type(n<\/i>)<\/td>\np:nth-last-of-type(2)<\/td>\n\u9009\u62e9\u6bcf\u4e2ap\u5143\u7d20\u7684\u662f\u5176\u7236\u7ea7\u7684\u7b2c\u4e8c\u4e2ap\u5143\u7d20\uff0c\u4ece\u6700\u540e\u4e00\u4e2a\u5b50\u9879\u8ba1\u6570<\/td>\n3<\/td>\n<\/tr>\n
:last-child<\/td>\np:last-child<\/td>\n\u9009\u62e9\u6bcf\u4e2ap\u5143\u7d20\u662f\u5176\u7236\u7ea7\u7684\u6700\u540e\u4e00\u4e2a\u5b50\u7ea7\u3002<\/td>\n3<\/td>\n<\/tr>\n
:root<\/td>\n:root<\/td>\n\u9009\u62e9\u6587\u6863\u7684\u6839\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:empty<\/td>\np:empty<\/td>\n\u9009\u62e9\u6bcf\u4e2a\u6ca1\u6709\u4efb\u4f55\u5b50\u7ea7\u7684p\u5143\u7d20\uff08\u5305\u62ec\u6587\u672c\u8282\u70b9\uff09<\/td>\n3<\/td>\n<\/tr>\n
:target<\/td>\n#news:target <\/td>\n\u9009\u62e9\u5f53\u524d\u6d3b\u52a8\u7684#news\u5143\u7d20\uff08\u5305\u542b\u8be5\u951a\u540d\u79f0\u7684\u70b9\u51fb\u7684URL\uff09<\/td>\n3<\/td>\n<\/tr>\n
:enabled<\/td>\ninput:enabled<\/td>\n\u9009\u62e9\u6bcf\u4e00\u4e2a\u5df2\u542f\u7528\u7684\u8f93\u5165\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:disabled<\/td>\ninput:disabled<\/td>\n\u9009\u62e9\u6bcf\u4e00\u4e2a\u7981\u7528\u7684\u8f93\u5165\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:checked<\/td>\ninput:checked<\/td>\n\u9009\u62e9\u6bcf\u4e2a\u9009\u4e2d\u7684\u8f93\u5165\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:not(selector<\/i>)<\/td>\n:not(p)<\/td>\n\u9009\u62e9\u6bcf\u4e2a\u5e76\u975ep\u5143\u7d20\u7684\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
::selection<\/td>\n::selection<\/td>\n\u5339\u914d\u5143\u7d20\u4e2d\u88ab\u7528\u6237\u9009\u4e2d\u6216\u5904\u4e8e\u9ad8\u4eae\u72b6\u6001\u7684\u90e8\u5206<\/td>\n3<\/td>\n<\/tr>\n
:out-of-range<\/td>\n:out-of-range<\/td>\n\u5339\u914d\u503c\u5728\u6307\u5b9a\u533a\u95f4\u4e4b\u5916\u7684input\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:in-range<\/td>\n:in-range<\/td>\n\u5339\u914d\u503c\u5728\u6307\u5b9a\u533a\u95f4\u4e4b\u5185\u7684input\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:read-write<\/td>\n:read-write<\/td>\n\u7528\u4e8e\u5339\u914d\u53ef\u8bfb\u53ca\u53ef\u5199\u7684\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:read-only<\/td>\n:read-only<\/td>\n\u7528\u4e8e\u5339\u914d\u8bbe\u7f6e \"readonly\"\uff08\u53ea\u8bfb\uff09 \u5c5e\u6027\u7684\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:optional<\/td>\n:optional<\/td>\n\u7528\u4e8e\u5339\u914d\u53ef\u9009\u7684\u8f93\u5165\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:required <\/td>\n:required<\/td>\n\u7528\u4e8e\u5339\u914d\u8bbe\u7f6e\u4e86 \"required\" \u5c5e\u6027\u7684\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:valid <\/td>\n:valid<\/td>\n\u7528\u4e8e\u5339\u914d\u8f93\u5165\u503c\u4e3a\u5408\u6cd5\u7684\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n
:invalid <\/td>\n:invalid<\/td>\n\u7528\u4e8e\u5339\u914d\u8f93\u5165\u503c\u4e3a\u975e\u6cd5\u7684\u5143\u7d20<\/td>\n3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"CSS \u9009\u62e9\u5668\u5217\u8868zh-cn","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[175],"tags":[],"class_list":["post-2437","post","type-post","status-publish","format-standard","hentry","category-css-jc"],"_links":{"self":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/2437"}],"collection":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/comments?post=2437"}],"version-history":[{"count":0,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/2437\/revisions"}],"wp:attachment":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/media?parent=2437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/categories?post=2437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/tags?post=2437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}