IE常见bugs以及解决方案详谈

  • 1、如何解决IE6及更早浏览器浮动时产生双倍边距的BUG?

    #test{display:inline;}

    2、如何解决IE6及更早浏览器下的3像素BUG?

     .a{color:#f00;}

      .main{width:950px;background:#eee;}

      .content{float:left;width:750px;height:100px;background:#ccc;_margin-right:-3px;}

      .aside{height:100px;background:#aaa;}

      <div class="main">

        <div class="content">content</div>

        <div class="aside">aside</div>

      </div>

    在IE6及更早浏览器下为.content设置margin-right:-3px;也可以设置.aside为浮动

    3、如何在IE6及更早浏览器下模拟min-height效果?

    #test{min-height:100px;_height:100px;}

    注意此时#test不能再设置overflow的值为hidden,否则模拟min-height效果将失效

    4、如何解决IE7及更早浏览器下当li中出现2个或以上的浮动时,li之间产生的空白间隙的BUG?

    li{vertical-align:top;}

    5、如何解决IE6使用滤镜PNG图片透明后,容器内链接失效的问题?

    div{width:300px;height:100px;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='*.png');}

    a{_position:relative;}

    解决方法是为容器内的链接定义相对定位属性position的值为relative

    6、IE6设置了margin:auto ,容器无法居中?

    方法一:定义宽度

    方法二:检查DTD声明是否完整

    7、如何设置IE下的iframe背景透明?

    设置iframe元素的标签属性allowtransparency="allowtransparency"然后设置iframe内部页面的body背景色为transparent。 不过由此会引发IE下一些其它问题,如:设置透明后的iframe将不能遮住select

    8、IE6 position:fixed 固定定位问题

    详细解决方案,请点击此链接 》》》 

    9、让IE6支持max-width, max-height属性

    例如:如果你有一个或多个图像,显示图像的高度和宽度应该有一些限制。即图像不应该有宽度超过500px(假设),高度不超过200px,那么图像的CSS应为如下:

    img{ 

    max-height:200px;max-width:500px; 

    width:expression(document.body.clientWidth > 500? "500px": "auto" );  /*for ie6*/ 

    height:expression(document.body.clientHeight > 200? "200px": "auto" );  /*for ie6*/

     }























      http://www.js0573.com/yx/jsfs/5489113.html

      http://www.js0573.com/yx/jsfs/5483322.html

      http://www.js0573.com/yx/jsfs/5483198.html

      http://www.js0573.com/yx/jsfs/5483248.html

      http://www.js0573.com/yx/jsfs/5483363.html

      http://www.js0573.com/yx/jsfs/5482983.html

      http://www.js0573.com/yx/jsfs/5483080.html

      http://www.js0573.com/yx/jsfs/5482935.html

      http://www.changsha.cn/ys/dthsh/3804593.html

      http://www.changsha.cn/ys/dthsh/3804003.html

      http://www.changsha.cn/ys/dthsh/3804042.html

      http://www.changsha.cn/ys/dthsh/3803983.html

      http://www.changsha.cn/ys/dthsh/3804089.html

      http://www.changsha.cn/ys/dthsh/3804069.html

      http://www.changsha.cn/ys/dthsh/3801657.html

      http://www.changsha.cn/ys/dthsh/3801679.html

      http://www.changsha.cn/ys/dthsh/3801666.html



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值