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. cisco路由器配置教程

    配置cisco路由器 经过几十年的发展,从最初的只有四个节点的ARPANET发展到现今无处不在的Internet,计算机网络已经深入到了我们生活当中.随着计算机网络规模的爆炸性增长,作为连接设备的路由 ...

  2. No identifier specified for entity

    主键问题   使用hibernate的e-r映射pojo类的时候遇到org.hibernate.AnnotationException: No identifier specified for ent ...

  3. graylog2+syslog-ng+mongodb构建集中管理日志服务器 --转载

    原文地址:http://blog.chinaunix.net/uid-11065483-id-3654882.html 由于公司内需要监控QQ的上下线记录,原本使用了分光+Panabit+Splunk ...

  4. Linux vi编辑器

    vim在内存缓冲区中处理数据 如果在启动vim时未指定文件名,或者这个文件不存在,vim会新开一段缓冲区来编辑. h 左移一个字符 j 下移一行 k 上移一行 l 右边移一个字符 PageDown(C ...

  5. tlb转dll

    项目中需要用到c++编写的dll文件,但是同事发给我的是一个tlb后缀的文件,此时需要用到vs命令工具,具体操作如下: 开始-->vs2010-->vs命令提示(2010) ,打开后,输入 ...

  6. jboss部署出现MarshalOutputStream找不到错误

    在jboss EAP 6.3上部署一个war时,项目使用oracle coherence做为缓存,出现如下错误 Caused by: java.lang.NoClassDefFoundError: s ...

  7. VC+ADO连接DBF字符串

    1.m_strConnect.Format(TEXT("Driver={Microsoft dBASE Driver (*.dbf)}; DriverID=277;Dbq=%s;" ...

  8. [未完成]plugin.xml文件

    此文章部分转自:http://fxzcollege6.iteye.com/blog/2013055 关于plugin.xml文件我还总结过一篇文章:http://www.cnblogs.com/Dre ...

  9. 【基本计数方法---加法原理和乘法原理】UVa 11538 - Chess Queen

    题目链接 题意:给出m行n列的棋盘,当两皇后在同行同列或同对角线上时可以互相攻击,问共有多少种攻击方式. 分析:首先可以利用加法原理分情况讨论:①两皇后在同一行:②两皇后在同一列:③两皇后在同一对角线 ...

  10. Java线程池--ThreadPoolExecutor

    一.线程池的处理流程 向线程池提交一个任务后,它的主要处理流程如下图所示: 一个线程从被提交(submit)到执行共经历以下流程: 线程池判断核心线程池里的线程是否都在执行任务,如果不是,则创建一个新 ...