標籤:style io ar os 使用 sp java for 檔案
去除超連結的虛框的一些方法
1. a{
blr:expression(this.onFocus=this.blur());/*IE使用*/
outline-style:none;/*FF使用*/
} /*去除a標籤帶來的虛框*/
2、全 局控制 CSS實現
a{blr:expression(this.onFocus=this.close());} /* 只支援IE,過多使用效率低 */
a{blr:expression(this.onFocus=this.blur());} /* 只支援IE,過多使用效率低 */
a:focus { -moz-outline-style: none; } /* 支援Firefox IE不支援 */
方法一:
<a onfocus=this.blur() href="javascript:void(0)" class="l-button" style="width:80px" onclick=‘log_1()‘>
<img id="img_a" border=0 align="middle" src="login_image/a_1.jpg" alt="沒有圖片!"> </img>
</a>
onfocus=this.blur() 增加這個,可以去掉!
方法二:
1.把以下代碼存成一個1.htc的檔案
<public:attach event="onfocus" onevent="quit()" />
<script language="javascript">
function quit(){
this.blur();
}
</script>
2.在你的html檔案head中加入以下代碼,這樣所有的串連都沒虛線了
<style>
a {behavior:url(1.htc)}
area {behavior:url(1.htc)}
</style>
總結方法:
去掉連結時的虛框只要在你的樣式表中加入以下代碼,就可以去掉連結時煩的的虛框
a,area { blr:expression(this.onFocus=this.blur()) } /* for IE */
:focus { -moz-outline-style: none; } /* for Firefox */
使用CSS運算式去除超連結的虛框的一些方法