css属性选择器语法:[attribute=value] 如:[target=-blank] /*选择所有使用target="-blank"的元素*/或 [attribute~=value] 如:[title~=flower] /*选择标题属性包含单词"flower"的所有元素*/或[attribute|=language] 如:[lang|=en] /*选择一个lang属性的起始值="EN"的所有元素*/
css属性选择器实例一:选择所有使用target="_blank"的a元素 The link with target="_blank" gets a yellow background: manongjc.comdisney.comwikipedia.orgNote: For [attribute] to work in IE8 and earlier, a DOCTYPE must be declared.
在线运行 css属性选择器实例二:选择标题属性包含单词"flower"的所有元素 The image with the title attribute containing the word "flower" gets a yellow border.    Note: For [attribute~=value] to work in IE8 and earlier, a DOCTYPE must be declared.
在线运行 css属性选择器实例二:选择一个lang属性的起始值="en"的所有元素 Hello! Hi! Ello! Hi! Hei! Note: For [attribute|=value] to work in IE8 and earlier, a DOCTYPE must be declared.
在线运行 相关阅读: css选择器 |