zoukankan      html  css  js  c++  java
  • IE BUG

    float

    当非float的元素和float的元素在一起的时候,如果非float元素在先,那么float的元素将被排斥,也就是说,你的span是float:right,但是你的a还是float:none 如果要让两者占据同一行,要么你把span先于a显示,要么把a也设成float(float:left).

    http://www.enhanceie.com/ie/bugs.asp

    条件注释<html>

    条件注释<html>跟上面的方法原理一样,只不过这里是给<html>注释不同的class。

    <!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
    <!--[if IE 7 ]> <html class="ie7"> <![endif]-->
    <!--[if IE 8 ]> <html class="ie8"> <![endif]-->
    <!--[if IE 9 ]> <html class="ie9"> <![endif]-->
    <!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->

    这样在CSS中使用下面的代码即可区分版本

    #content{background:red;}
    .ie9 #content{background:orange;}
    .ie8 #content{background:yellow;}
    .ie7 #content{background:green;}
    .ie6 #content{background:blue;}

    IE6中利用容器对溢出内容的处理方式来实现的
    <!--[if IE 6]>  利用IE独有的条件语句可以针对不同的IE版本精确设置,同时避免了这些代码被其他浏览器读到
    <style type="text/css">
    html{overflow:hidden;}
    body{height:100%;overflow:auto;}
    #fixed{position:absolute;right:17px;}
    fixed元素的绝对位置是相对于HTML元素来说,而滚动条是body元素的,这是设置right:17px的原因
    </style>
    <![endif]-->
  • 相关阅读:
    自定义jdbc框架
    sql 批处理、获取自增长、事务、大文本处理
    数据库设计
    数据约束
    mysql操作之二
    mysql基本操作
    38. 外观数列
    合并两个有序链表
    有效的括号
    实现strStr
  • 原文地址:https://www.cnblogs.com/leonbond/p/2768014.html
Copyright © 2011-2022 走看看