ITeye博客

border在IE6设置transparent无效

squll369 · 2011-07-31 11:12 · Web 前端 · Web前端 · Markdown

在CSS中 定义

 

border:1px solid transparent;

 

在IE6下是无效的,IE以上版本都是ok的,firefox也是ok的,要在IE6下也有此效果 ,用如下样式替代:

_border-color:tomato; /*For IE6-*/
_filter:chroma(color=tomato);/*For IE6-*/ 

 原理是先给border定义一个颜色,然后再把这个颜色过滤掉。

 

一般要给border设置一个透明的边框,都是为了要撑位置,不然直接设置 border:0px 即可。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。