如何用CSS实现在新窗口打开链接
[ 2008-05-27 17:04:11 | 作者: hesatao ]
在页面中加入:
<head>
<base target="_blank">
</head>
注意事项:< base >必须写在< head >标记里
2,定义CSS:a:active {text:expression(target="_blank");}以下是示例:
CSS中定义如下
<style type="text/css">
.ww{width:210px;border:1px solid #AAA;}
.yy{width:210px;border:1px solid #AAA;}
.ww a:active {test:expression(target="_blank");}
</style>
在Body中一段:
<div class="ww">
<a href=http://www.zys8.com>showflash</a>
</div>
<div class="yy">
<a href=http://www.zys8.com>showflash</a>
</div>
评论Feed: http://www.zys8.com/myblog/feed.asp?q=comment&id=302
这篇日志没有评论。
此日志不可发表评论。






