1、IE6下的双边距bug

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>双边距bug</title>
<style>
* { margin: 0; padding: 0; }
.box{
width: 500px;
height: 300px;
background: red;
float: left; /* 在块级标签中添加浮动float之后,又添加margin,会导致IE6下的双边距bug */
margin-left: 50px;
/* 解决方案: 为IE6添加样式,将块级元素变为行内元素 */
_display: inline;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>

2、IE6下的1px偏差

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>IE6的1px偏差</title>
<style>
/* position:absolute;解决方案:为IE6下的定位元素的父级宽高都设定为偶数,就可以避免 */
.box1 { width: 400px; height: 400px; border: 1px solid black; position: relative; }
.box2 { width: 50px; height: 50px; position: absolute; right: -1px; bottom: -1px; background: yellow; }
</style>
</head>
<body>
<div class="box1">
<div class="box2"></div>
</div>
</body>
</html>

3、IE6下overflo: hidden;不起作用。

解决方案:这时候给父级也添加position:relative;

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>在IE6-overflow-hidden</title>
<style>
.box1 { width: 500px; height: 300px; background: red; overflow: hidden; position: relative; }
.box2 { width: 300px; height: 500px; background: yellow; position: relative; }
</style>
</head>
<body>
<div class="box1">
<div class="box2"></div>
</div>
</body>
</html>

4、如何分别单独定义IE6 7 8 的样式

_width: 900px;      /* IE6专用 */ 

*+width: 900ox;  /* IE7专用 */ 

*width: 900px;      /* IE7 6 都起作用 */ 

width: 900px\9;     /* IE6 7 8 9 10 */

width: 900px\0;     /* IE8 9 10 */

width: 900px\9\0;    /* IE9 10 */

IE下的bug解决方案的更多相关文章

  1. 【腾讯Bugly干货分享】手游热更新方案xLua开源:Unity3D下Lua编程解决方案

    本文来自于腾讯Bugly公众号(weixinBugly),未经作者同意,请勿转载,原文地址:http://mp.weixin.qq.com/s/2bY7A6ihK9IMcA0bOFyB-Q 导语 xL ...

  2. input 光标在 chrome下不兼容 解决方案

    input 光标在 chrome下不兼容 解决方案 height: 52px; line-height: normal; line-height:52px\9 .list li input[type= ...

  3. 为什么我没有拔出钥匙 ——开锁引发的程序bug解决方案的思考

    http://blog.csdn.net/wojiushiwo987/article/details/8851204为什么我没有拔出钥匙                             ——开 ...

  4. IE6/7 下:inline-block解决方案

    6/IE7下:inline-block解决方案   IE6/IE7下对display:inline-block的支持性不好. 1.inline元素的display属性设置为inline-block时, ...

  5. jqueryeasyUI dialog 弹出窗口超出浏览器,导致不能关闭的bug解决方案

    jqueryeasyUI dialog 弹出窗口超出浏览器,导致不能关闭的bug解决方案 2014年8月30日 3233次浏览 相信很多前端朋友都用过jqueryeasyUI,jqueryeasyUI ...

  6. Ext1.X的CheckboxSelectionModel默认全选之后不允许编辑的BUG解决方案

    Ext1.X的CheckboxSelectionModel默认全选之后不允许编辑的BUG解决方案,ext 的CheckboxSelectionModel在后台默认选中之后,前台就不允许编辑的bug是存 ...

  7. alibaba druid 在springboot start autoconfig 下的bug

    alibaba druid 在springboot start autoconfig下的bug 标签(空格分隔):druid springboot start autoconfig 背景 发现.分析过 ...

  8. react native 0.56.0版本在windows下有bug不能正常运行

    react native的0.56.0版本在windows下有bug不能正常运行请init 0.55.4的版本 react-native init MyApp --version 0.55.4 注意v ...

  9. ie下的bug之button

    场景描述: 现在页面设计是都喜欢自定义按钮样式,某日接收到页面发现在ie下有bug,上代码: <div> <button><span><a href=&quo ...

随机推荐

  1. 构建高效安全的Nginx Web服务器

    一 为什么选择Nginx搭建Web服务器 Apache和Nginx是目前使用最火的两种Web服务器,Apache出现比Nginx早.Apache HTTP Server(简称Apache)是世界使用排 ...

  2. 双系统下,Windows如何正确删除Linux系统

    一般电脑装了双系统,特别是Windows加Linux的电脑,不可以在Windows中直接删了linux,因为一般安装linux的时候,grub都写进了mbr,直接删了Windows就进不了了,除非原来 ...

  3. 还在用GCD?来看看NSOperation吧

    在iOS开发中,谈到多线程,大家第一时间想到的一定是GCD.GCD固然是一套强大的多线程解决方案,能够解决绝大多数的多线程问题,但是他易于上手难于精通且到处是坑的特点也注定了想熟练使用它有一定的难度. ...

  4. Peter's Hobby

    Problem Description Recently, Peter likes to measure the humidity of leaves. He recorded a leaf humi ...

  5. Android(java)学习笔记198:Android下的逐帧动画(Drawable Animation)

    1.帧动画: 帧动画顾名思义,一帧一帧播放的动画就是帧动画. 帧动画和我们小时候看的动画片的原理是一样的,在相同区域快速切换图片给人们呈现一种视觉的假象感觉像是在播放动画,其实不过是N张图片在一帧一帧 ...

  6. css笔记09:选择器优先级

    1. (1) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www. ...

  7. CSS: Float a div on another div, Ex: Text caption on picture

    <style type="text/css"> .figure { width: 316px; height: 205px; display: block; borde ...

  8. jboss使用(eap 6.0以后版本)

    以6.3版本为例,下载地址 https://www.jboss.org/products/eap/download/,这个地址现在有问题了,下不了好像要redhat账号还要花钱?不知咋回事 下载完成后 ...

  9. 设计包含min函数的栈

    stack<pair<int, int>> sta; void push(int x) { int min_i; if(sta.empty()) { min_i = x; } ...

  10. 关于Object[]数组强转成Integer[]类型的数组.

    为什么不能由Object[]数组强转成Integer[]数组. Object[] ins= { new Integer(0), new Integer(1), new Integer(2), new ...