Last active
February 22, 2017 13:14
-
-
Save zhuping/5537984 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CSS 1中定义的选择器 | |
选择器 类型 说明 | |
E 类型选择器 选择指定类型的元素 | |
E#myid ID选择器 选择匹配E的元素,且匹配元素的id属性值等于myid。注意,E选择符可以省略,表示选择指定id属性 | |
等于myid的任意类型的元素 | |
E.warning 类选择器 选择匹配E的元素,且匹配元素的class属性值等于warning。注意,E选择符可以省略,表示选择指定 | |
class属性值等于warning的任意类型的任意多个元素 | |
E F 包含选择器 选择匹配F的元素,且该元素被包含在匹配E的元素内。注意,E和F不仅仅是指类型选择器,可以任意 | |
合法的选择符组合 | |
E:link 链接伪类选择器 选择匹配E的元素,且匹配元素被定义了超链接并未被访问。例如:a:link选择器能够匹配已定义URL的 a元素 | |
E:visited 链接伪类选择器 选择匹配E的元素,且匹配元素被定义了超链接并已被访问。例如:a:visited选择器能够匹配已被访问 的a元素 | |
E:active 用户操作伪类选择器 选择匹配E的元素,且匹配元素被激活 | |
E:hover 用户操作伪类选择器 选择匹配E的元素,且匹配元素正被鼠标经过 | |
E:focus 用户操作伪类选择器 选择匹配E的元素,且匹配元素获取了焦点 | |
E::first-line 伪元素选择器 选择匹配E元素内的第一行文本 | |
E::first-letter 伪元素选择器 选择匹配E元素内的第一个字符 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment