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]-->
  • 相关阅读:
    游戏方案
    团队介绍
    【面向对象程序设计】作业四
    FIFO与LRU实现(Java)
    spring事务介绍
    微信抢红包算法
    Hibernate Dao映射配置通用接口类反射获取加载calass实例
    股票两次买卖最大收益(java)
    Eclipse安装JD-Eclipse反编译插件看源码
    Java GC调优
  • 原文地址:https://www.cnblogs.com/leonbond/p/2768014.html
Copyright © 2011-2022 走看看