IE下的bug解决方案
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解决方案的更多相关文章
- 【腾讯Bugly干货分享】手游热更新方案xLua开源:Unity3D下Lua编程解决方案
本文来自于腾讯Bugly公众号(weixinBugly),未经作者同意,请勿转载,原文地址:http://mp.weixin.qq.com/s/2bY7A6ihK9IMcA0bOFyB-Q 导语 xL ...
- input 光标在 chrome下不兼容 解决方案
input 光标在 chrome下不兼容 解决方案 height: 52px; line-height: normal; line-height:52px\9 .list li input[type= ...
- 为什么我没有拔出钥匙 ——开锁引发的程序bug解决方案的思考
http://blog.csdn.net/wojiushiwo987/article/details/8851204为什么我没有拔出钥匙 ——开 ...
- IE6/7 下:inline-block解决方案
6/IE7下:inline-block解决方案 IE6/IE7下对display:inline-block的支持性不好. 1.inline元素的display属性设置为inline-block时, ...
- jqueryeasyUI dialog 弹出窗口超出浏览器,导致不能关闭的bug解决方案
jqueryeasyUI dialog 弹出窗口超出浏览器,导致不能关闭的bug解决方案 2014年8月30日 3233次浏览 相信很多前端朋友都用过jqueryeasyUI,jqueryeasyUI ...
- Ext1.X的CheckboxSelectionModel默认全选之后不允许编辑的BUG解决方案
Ext1.X的CheckboxSelectionModel默认全选之后不允许编辑的BUG解决方案,ext 的CheckboxSelectionModel在后台默认选中之后,前台就不允许编辑的bug是存 ...
- alibaba druid 在springboot start autoconfig 下的bug
alibaba druid 在springboot start autoconfig下的bug 标签(空格分隔):druid springboot start autoconfig 背景 发现.分析过 ...
- 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 ...
- ie下的bug之button
场景描述: 现在页面设计是都喜欢自定义按钮样式,某日接收到页面发现在ie下有bug,上代码: <div> <button><span><a href=&quo ...
随机推荐
- Helpers\Tags
Helpers\Tags The tags helper is a collection of useful methods: Tags::clean($data) Clean function to ...
- java中文件操作
例一:从一个文件读入数据,然后写入另外一个文件 package lipika; import java.io.FileInputStream; import java.io.FileNotFoundE ...
- JavaScript 正则表达式相关理解
1.使用正则的test.exec方法而且带有g属性进行连续匹配的时候, 如果每次匹配之前 lastIndex属性没有清零. <script> var str='123qweQWE125|2 ...
- linux -cp/mv
cp 复制 -r文件夹 -f强制没有提示 mv 移动改名 mv test.py temp/test2.py移动(后面只加路径就是移动.路径+文件名就是移动+改名) 执行mv一般会执行 mv -i交互 ...
- CF Two Buttons (BFS)
Two Buttons time limit per test 2 seconds memory limit per test 256 megabytes input standard input o ...
- windows下编辑过的文件在Linux下用vi打开行尾会多出一个^M符号
一般情况下,windows下编辑过的文件在Linux下用vi打开行尾会多出一个^M符号,如下图: 这是因为Windows等操作系统用的文本换行符和UNIX/Linux操作系统用的不同,Windows系 ...
- CSS3动画与过渡
transform:在使用2D或3D转换前需用transform-style申明转换的类型,preserve-3d或者preserve-2d 属性 translate(): 通过 translate( ...
- HTTP - Session 机制
HTTP 是种无状态的协议,即使用 HTTP 协议时,每次发送请求都会产生对应的新响应,协议本身不会保留之前一切的请求或响应报文的信息.这是为了更快地处理大量事务,确保协议的可伸缩性,而特意把 HTT ...
- Java中几种常见排序算法
日常操作中常见的排序方法有:冒泡排序.快速排序.选择排序.插入排序.希尔排序等. 冒泡排序是一种简单的排序算法.它重复地走访过要排序的数列,一次比较两个元素,如果他们的顺序错误就把他们交换过来.走访数 ...
- Cocos2d-x开发实例介绍帧动画使用
下面我们通过一个实例介绍一下帧动画的使用,这个实例如下图所示,点击Go按钮开始播放动画,这时候播放按钮标题变为Stop,点击Stop按钮可以停止播放动画. 下面我们再看看具体的程序代码,首先看一下看H ...