这个选择符用于选择出特定的单一元素;id在一个文档中应该是惟一的。
This selector is used to single out a particular element; IDs should be unique within a document.
换句话来说,它们不是同一元素,就算它们看起来像是,并且拥有相同的标识符也不行。
In other words, these are not the same element even though they look the same and have identical characteristics.
例如,如下的属性选择符匹配那些指定了“ title ”属性的H1元素,而不论其值为什么?
For example, the following attribute selector matches all H1 elements that specify the "title" attribute, whatever its value.
应用推荐