案例:CSS3 案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<style>
5
a[target=_blank]
6
{
7
background-color:yellow;
8
}
9
</style>
10
</head>
11
<body>
12
13
<p>target="_blank" 的链接会得到黄色背景:</p>
14
15
<a href="//www.w3xue.com">w3xue.com</a>
16
<a href="http://www.disney.com" target="_blank">disney.com</a>
17
<a href="http://www.wikipedia.org" target="_top">wikipedia.org</a>
18
19
<p><b>注释:</b>对于 IE8 及更早版本的浏览器中的 [<i>attribute</i>],必须声明 <!DOCTYPE></p>
20
</body>
21
</html>
22