• IE6 minheight


    ie6确实不支持   对于min-height我一般是直接给ie6设置height,  ie6会当做最小高度来处理,如果内部元素的尺寸超出了,会自动撑大父元素
    例如:
    div {min-height:300px;height:auto !important;height:300px;}
    这样写的话 ie6会读取height:300px;而忽略height:auto;等于给ie6里设置了一个最小高度;
    而其他浏览器会读取height:auto;和min-height:300px;

    expression(this.width > 300 ? 300 : true); height: expression(this.height > 300 ? 300 : true); max- 300px; max-height: 300px;

    转自:http://bbs.blueidea.com/thread-2954607-1-1.html

    设置元素的最大宽度。

    语法

    { max- sMaxWidth }

    可能的值

    sMaxWidth

    指定或接收元素最大宽度的变量:

    length

    浮点数,后跟绝对单位指示符(cmmminptpc)或相对单位指示符(emexpx)。

    有关支持的长度单位的详细信息,请参阅长度单位参考

    percentage

    后跟百分号 (%) 的整数,用于指定容器块宽度的百分比,以用作元素的最大宽度。如果未显式设置容器块的宽度,则元素没有最大宽度,并且 max-width 属性被解释为 0%。有关容器块和如何计算其宽度的详细信息,请参阅 Cascading Style Sheets (CSS), Level 2, Revision 1 (CSS2.1)(级联样式表 (CSS),第 2 级,修订版本 1 (CSS2.1))规范。

    此属性没有默认值。该属性不会被继承。

    注解

    min-widthmax-width 属性适用于浮动的和绝对定位的块级元素及嵌入块的元素,以及一些固有的控件。它们不适用于非替换的内联元素,例如表行和行/列组。(“替换的”元素本身具有尺寸,例如 IMG 元素或 TEXTAREA 元素。)

    只能在严格的 !DOCTYPE 下启用此属性。

    示例

    以下示例演示如何通过使用 min-widthmax-width 属性限制 DIV 元素的宽度。只能使用 Internet Explorer 7 或更高版本来查看此示例:

    <!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Strict//EN">
    <html>
    <head><style>
    .width {
        50%;
        min-200px;
        max-400px;
        background:#eee;
    }
    .content {
        border :1px solid #c00;
        padding:5px;
    }
    </style>
    </head>
    <body>
    <div class="width">
    <div class="content">
            <h2>{min-200px; max-400px}</h2>
            <p>This div also has a width of 50%. Resize the window
             to grow and shrink the div from max to min width.<br/><br/>
             The outer div controls the width of the inner "content" div.
             Note that the div height increases to accomodate the flow of text.</p>
    </div>
    </div>
    </body>
    </html>
    
    标准信息

    此属性在 Cascading Style Sheets (CSS), Level 2 (CSS2)(级联样式表 (CSS),第 2 级 (CSS2))中定义。

    应用于

    A、ABBR、ACRONYM、ADDRESS、APPLET、B、BDO、BIG、BLOCKQUOTE、BUTTON、CAPTION、CENTER、CITE、CODE、CUSTOM、DD、DEL、DFN、DIV、DL、DT、EM、FIELDSET、FONT、FORM、HN、HR、I、IMG、INPUT TYPE=BUTTON、INPUT TYPE=CHECKBOX、INPUT TYPE=FILE、INPUT TYPE=IMAGE、INPUT TYPE=PASSWORD、INPUT TYPE=RADIO、INPUT TYPE=RESET、INPUT TYPE=SUBMIT、INPUT TYPE=TEXT、INS、LI、OL、OPTION、P、Q、RT、RUBY、S、SELECT、SPAN、SUB、TT、U、UL、VAR、XMP

    另请参见

    概念

    转自:http://msdn.microsoft.com/zh-cn/library/ee341485(Expression.30).aspx

  • 相关阅读:
    marMariaDB & MYSQL flexviews
    tomcat与resin的比较
    nginx 1.4.3能直接升到1.8.1吗
    Docker Compose vs. Dockerfile
    分布式事务 spring 两阶段提交 tcc
    linux下拷贝整个目录
    MySQL :: Fatal error: Can&#039;t change to run as user &#039;mysql&#039;. Please check that the user exists!
    python Drools
    KubeCon CloudNativeCon China 2019
    在mysql中修改表名的sql语句
  • 原文地址:https://www.cnblogs.com/johnwonder/p/1703216.html
Copyright © 2020-2023  润新知