diff --git a/docs/css.html b/docs/css.html index a38fe3cd..f202a312 100644 --- a/docs/css.html +++ b/docs/css.html @@ -305,7 +305,7 @@ -
选择器 | 说明 |
---|---|
a[target] | 带有 |
a[target="_blank"] | 在新标签中打开 |
a[href^="/index"] | 以 |
[class|="chair"] | 以 |
[class*="chair"] | 包含 |
[title~="chair"] | 包含单词 |
a[href$=".doc"] | 以 |
[type="button"] | 指定类型 |
选择器 | 说明 |
---|---|
a[target] | 带有 |
a[target="_blank"] | 在新标签中打开 # |
a[href^="/index"] | 以 |
[class|="chair"] | 以 |
[class*="chair"] | 包含 |
[title~="chair"] | 包含单词 |
a[href$=".doc"] | 以 |
[type="button"] | 指定类型 # |
另见: 属性选择器
选择器 | 说明 |
---|---|
p::after | 在 p 之后添加内容 # |
p::before | 在 p 之前添加内容 # |
p::first-letter | p中的第一个字母 # |
p::first-line | p 中的第一行 # |
::selection | 由用户选择 # |
::placeholder | 占位符 属性 # |
:root | 文档根元素 # |
:target | 突出显示活动锚点 # |
div:empty | 没有子元素的元素 # |
p:lang(en) | 带有 en 语言属性的 P # |
:not(span) | 不是跨度的元素 # |
选择器 | 说明 |
---|---|
p::after | 在 p 之后添加内容 # |
p::before | 在 p 之前添加内容 # |
p::first-letter | p中的第一个字母 # |
p::first-line | p 中的第一行 # |
::selection | 由用户选择 # |
::placeholder | 占位符 属性 # |
:root | 文档根元素 # |
:target | 突出显示活动锚点 # |
div:empty | 没有子元素的元素 # |
p:lang(en) | 带有 en 语言属性的 P # |
:not(span) | 不是跨度的元素 # |
:host | shadowDOM 中选择自定义元素 # |
::backdrop | 处于全屏模式的元素样式 # |
::marker | li 项目符号或者数字 # |
::file-selector-button | type="file" input 按钮 # |
选择器 | 说明 |
---|---|
input:checked | 检查 input # |
input:disabled | 禁用 input # |
input:enabled | 启用的 input # |
input:focus | input 有焦点 # |
input:in-range | 范围内的值 # |
input:out-of-range | input 值超出范围 # |
input:valid | input 有效值 # |
input:invalid | input 无效值 # |
input:optional | 没有必需的属性 # |
input:required | 带有必需属性的 input # |
input:read-only | 具有只读属性 # |
input:read-write | 没有只读属性 # |
input:indeterminate | 带有 indeterminate 状态 # |
选择器 | 说明 |
---|---|
input:checked | 检查 input # |
input:disabled | 禁用 input # |
input:enabled | 启用的 input # |
input:default | 有默认值的元素 # |
input:blank | 空的输入框 # |
input:focus | input 有焦点 # |
input:in-range | 范围内的值 # |
input:out-of-range | input 值超出范围 # |
input:valid | input 有效值 # |
input:invalid | input 无效值 # |
input:optional | 没有必需的属性 # |
input:required | 带有必需属性的 input # |
input:read-only | 具有只读属性 # |
input:read-write | 没有只读属性 # |
input:indeterminate | 带有 indeterminate 状态 # |
选择器 | 说明 |
---|---|
p:first-child | 第一个孩子 # |
p:last-child | 最后一个孩子 # |
p:first-of-type | 首先是某种类型 # |
p:last-of-type | 某种类型的最后一个 # |
p:nth-child(2) | 其父母的第二个孩子 # |
p:nth-child(3n42) | Nth-child(an + b) 公式 # |
p:nth-last-child(2) | 后面的二孩 # |
p:nth-of-type(2) | 其父级的第二个 p # |
p:nth-last-of-type(2) | ...从后面 # |
p:only-of-type | 其父级的唯一性 # |
p:only-child | 其父母的唯一孩子 # |
选择器 | 说明 |
---|---|
p:first-child | 第一个孩子 # |
p:last-child | 最后一个孩子 # |
p:first-of-type | 首先是某种类型 # |
p:last-of-type | 某种类型的最后一个 # |
p:nth-child(2) | 其父母的第二个孩子 # |
p:nth-child(3n42) | Nth-child(an + b) 公式 # |
p:nth-last-child(2) | 后面的二孩 # |
p:nth-of-type(2) | 其父级的第二个 p # |
p:nth-last-of-type(2) | ...从后面 # |
p:only-of-type | 其父级的唯一性 # |
p:only-child | 其父母的唯一孩子 # |
:is(header, div) p | 可以选择的元素 # |
:where(header, div) p | 与 :is 相同 # |
a:has(> img) | 包含 img 元素的 a 元素 # |
::first-letter | 第一行的第一个字母 # |
::first-line | 第一行应用样式 # |