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 ...
随机推荐
- 跳表SkipList
原文:http://www.cnblogs.com/xuqiang/archive/2011/05/22/2053516.html 跳表SkipList 1.聊一聊跳表作者的其人其事 2. 言归正 ...
- AngularJS - 定时器 倒计时例子
<body> <div ng-app="myApp"> <div ng-controller="firstController"& ...
- Android Service与Activity之间通信的几种方式
在Android中,Activity主要负责前台页面的展示,Service主要负责需要长期运行的任务,所以在我们实际开发中,就会常常遇到Activity与Service之间的通信,我们一般在Activ ...
- PHP.11-PHP实例(二)-面向对象实例(图形计算器)
面向对象实例(图形计算器) [PHP语法详解] 1.实现外观 #不同的动作,输出不同的表单 ###关于PHP中,无法使用localhost访问.php文件[http://www.360doc.com/ ...
- 支持https请求以及https请求的抓包
iOS9推出的时候,苹果希望大家使用https协议,来提高数据传输之间的安全性.下面我就从最简单的代码介绍,如何在工程中设置,来支持https的请求. 一.证书准备篇 1.证书转换 在服务器人员,给你 ...
- Codec工具类
import java.math.BigInteger; import org.apache.commons.codec.DecoderException; import org.apache.com ...
- mongoDB 用java连接
(1)下载连接java 的驱动包mongo-2.10.1.jar 下载网址 https://github.com/mongodb/mongo-java-driver/downloads (2)导入下载 ...
- CentOS(四)--Linux系统的启动级别
对于绝大多数Linux程序员来说,进入Linux系统后一般看到的是黑乎乎的界面(开发模式),因为系统如果启动选择开发模式,会减少启动时间,优化内存等.但是通常我们刚安装完Linux系统,然后进去以后是 ...
- Groovy选型
Groovy是一门基于JVM的动态语言,同时也是一门面向对象的语言,语法上和Java非常相似.它结合了Python.Ruby和Smalltalk的许多强大的特性,Groovy 代码能够与 Java 代 ...
- IOS微信中看文章跳转页面后点击返回无效
经过查找原因发现,下面两种链接,链接1返回不了,链接2可以返回. 链接1:http://mp.weixin.qq.com/s?__biz=MzA5NDY5MzcyNA==&mid=265089 ...