小白教程
所有教程
关于
Search
172.70.131.28
172.70.131.28
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Sel attribute”的源代码
本页内容
上一节:
Sel_element_pluss
下一节:
Sel_attribute_value
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:[attribute]}}[[Category:css selectors|9]] = CSS [attribute] 选择器 = [[css selectors|完整CSS选择器参考手册]] 选择所有带有target属性的 <a>元素: <sample title="" desc="" lang="html" hererun="1"> a[target] { background-color:yellow; } </sample> <run name=""> <!DOCTYPE html> <html> <head> <style> a[target] { background-color:yellow; } </style> </head> <body> <p>The links with a target attribute gets a yellow background:</p> <a href="http://www.w3cschool.cc">w3cschool.cc</a> <a href="http://www.disney.com" target="_blank">disney.com</a> <a href="http://www.wikipedia.org" target="_top">wikipedia.org</a> <p><b>Note:</b> For [<i>attribute</i>] to work in IE8 and earlier, a DOCTYPE must be declared.</p> </body> </html> </run> == 浏览器支持 == 所有主流浏览器都支持 [attribute] 选择器。 == 浏览器支持 == 所有主流浏览器都支持 [attribute]选择器。 '''Note:''' [attribute] 在IE8中运行,必须声明 [[tag doctype|<!DOCTYPE>]] . == 相关文章 == CSS 教程: [[css attribute electors|CSS 属性选择器/a>]] [[css selectors|完整CSS选择器参考手册]]
返回至“
Sel attribute
”。
上一节:
Sel_element_pluss
下一节:
Sel_attribute_value