zoukankan      html  css  js  c++  java
  • IE CSS bug

    问题浏览器DEMO解决方法Hacking Rules: 
    property:all-ie\9; property:gte-ie8\0;*property:lte-ie7; +property:ie7; _property:ie6;1input[button | submit] 不能用 margin:0 auto; 居中IE8bug | fixed为input添加width2body{overflow:hidden;}没有去掉滚动条IE6/7bug | fixed设置html{overflow:hidden;}3hasLayout的标签拥有高度IE6/7bug | fixed*height:0;
    _overflow:hidden;4form>[hasLayout]元素有margin-left时,子元素中的[input | textarea] 出现2×margin-leftIE6/7bug | fixedform > [hasLayout 元素]{margin-left:宽度;}
    form div{*margin-left:宽度÷2;}5当border-width有1条<边3条时被设置成dotted时,1px的边dotted显示成dashedIE7bug | fixed不在同一个元素上使用不同宽度的 dotted6当子元素有position:relative的时候,父元素设置overflow:[hidden|auto]相当于给子元素设置了position:visible;IE6/7bug | fixed给父元素设置position:relative;7:hover伪类不能改变有position:absolute的子级元素的left/top值IE7bug | fixed把top/left的值设置成除0%外的所有百分值;或添加一个margin-[所有方向]除0外的所有值,包括0%8:focus + selector {}选择器失效IE8bug | fixed在失效选择器后面添加一个空选择器, :focus{}9列表中混乱的浮动:在list中浮动图片时,图片出现溢出正常位置;或没有list-styleIE8bug | fixed用背景图片替换list-style10th 不会自动继承上级元素的 text-alignIE8bug | fixed给th添加text-align:inherit; (base.css中已包含)11样式(包括link/style/@import(link))最多允许个为是:32IE6-8─常识99.99%的情况下,不会遇到12:hover 时若background-color为#fff,失效IE7bug | fixed把background-color改成background。或者,非#fff ||#ffffff13忽略’>’后有注释的选择器:selector> /**/ selector{}IE6bug | fixed[官方误判] 这个bug是IE6 BUG14* htmlIE6─ HACK只对IE6有效15PNG图片中的颜色和背景颜色的值相同,但显示不同IE6-7bug | fixed利用 pngcrush 去除图片中的 Gamma profiles16margin:0 auto; 不能让block元素水平居中IE6-8bug | fixed给block元素添加一个width17使用伪类 :first-line | :first-letter,属性的值中出现!important 会使属性失效IE8bug | fixed!important is evil, don’t use it anymore18:first-letter 失效IE6bug | fixed把 :first-letter 移到离{}最近的地方,如 h1, p:first-letter{},而非 p:first-letter h1{}19Position:absolute元素中,a display:block,在非:hover时只有文本可点击IE6/7bug | fixed给a添加background,如果背景透明,使用background:url(‘任何页面中已经缓存的文件链接’),不推荐background:url(#)[官方的解决方法],因为会增加一下HTTP请求20float列表元素不水平对齐:li不设置float,a设置display:block;float:[方向],li不水平对齐IE6/7bug | fixed给li设置display:inline 或 float:[方向]21dt, dd, li 背景失效IE6bug | fixeddt, dd, li{position:relative;}(base.css中已包含)22<noscript />元素的样式在启用javascript的情况下显示了样式IE6-8bug | fixed利用js给<noscript />添加display:none;23使用filter处理的透明背景图片的透明部分不可点IE6-8bug | fixed把background:none变成background:url(‘链接’),链接到本身和图片之外的任何文件24li内元素偏离 baseline 向下拉IE8bug | fixed给li设置display:inline 或 float:[方向]25列表中li的list-style不显示IE6/7bug | fixed给li添加margin-left,留空间来显示(不要加在ul上)26图片不能垂直居中IE6/7bug/fixed添加一个空标签,并赋给”Layout”,比如display:inline-block;27不能自定义指针样式IE6-8bug | fixed给指针文件设置绝对路径28背景溢出,拖动滚动条后显示正常IE6bug | fixed给父元素添加overflow:hidden防止溢出,并赋予hasLayout,如果添加_zoom:1;29高度超过height定义的高IE6bug/fixed添加_overflow:hidden;(推荐)或者_font-size:0;30宽度超过width定义的宽IE6bug/fixed添加_overflow:hidden; 或使用alice v3 中的.sl-word-break 类(table用.sl-table-break)31双倍边距IE6─常识添加display:inline到float元素中32margin负值隐藏:hasLayout的父元素内的非hasLayout元素,使用负边距时,超出父元素部分不可见IE6/7bug/fixed去掉父元素的hasLayout;或者赋hasLayout给子元素,并添加position:relative;33给两个浮动元素的某中一个的文字设定为斜体,另一个元素下拉在有斜体文字元素的下面IE6bug/fixed给有斜体文字的元素添加overflow:hidden;353px间隔:在float元素后的元素,会有3px间隔IE6bug/fixed因为是确切的3px,所以,用“暴力破解”吧,比如_margin-left:-3px;35text-align 影响块级元素IE6/7bug/fixed整理你的float;或者分开设置text-align

  • 相关阅读:
    linux下postgresql的c程序编译问题
    Linux下Sublime Text 2中文显示及中文输入问题[转][ubuntu 10.10]
    linux英文斜体乱码 【ubuntu 10.10】
    dropbox无法访问后国内网盘对比选择
    Linux查看系统信息的一些命令及查看已安装软件包的命令(转)
    linux配置ssh 【ubuntu 10.10】
    error: failed to push some refs【Linux】【Git】
    一些曾经收藏的话
    Linux系统源码安装过程中的prefix选项【转】
    LINUX GBK>UTF8文件编码批量转换脚本[转]
  • 原文地址:https://www.cnblogs.com/jasonoiu/p/1788945.html
Copyright © 2011-2022 走看看