1、IE6支持max-height解决方法    
IE6支持最大高度解决CSS代码:
.yangshi{max-height:1000px;_height:expression((document.documentElement.clientHeight||document.body.clientHeight)<1000?"1000px":"");overflow:hidden;}

说明:max-height:1000px; 这个是IE6以上级其它品牌浏览器支持最大范围高度。而_height:expression((document.documentElement.clientHeight||document.body.clientHeight)<1000?"1000px":"");overflow:hidden;则是让IE6支持max-height替代CSS代码,但效果和其它版本浏览器相同效果。

让所有浏览器都支持max-height的CSS样式代码,完整:
max-height:1000px;_height:expression((document.documentElement.clientHeight||document.body.clientHeight)<1000?"1000px":""); overflow:hidden;这里的1000和1000px是你需要的数值,注意3个数值的相同。

让IE6支持最大高度max-height的时候别忘记加上overflow:hidden;

2、IE6支持min-height解决方法     
IE6支持最小高度解决CSS代码:
.yangshi{min-height:1000px;_height:expression((document.documentElement.clientHeight||document.body.clientHeight)>1000?"1000px":"");}

说明:min-height:1000px; 这个是IE6以上级其它品牌浏览器支持最小范围高度。而_height:expression((document.documentElement.clientHeight||document.body.clientHeight)>1000?"1000px":"");则是让IE6支持min-height替代CSS代码,但效果和其它版本浏览器相同效果。

让所有浏览器都支持min-height的CSS样式代码,完整:
min-height:1000px;_height:expression((document.documentElement.clientHeight||document.body.clientHeight)>1000?"1000px":""); 这里的1000和1000px是你需要的数值,注意3个数值的相同。

3、IE6支持max-height又支持min-height方法    
让所有浏览器包括IE6即支持最大高度又支持最小高度。
.yangshi{Max-Height:620px;Min-Height:40px;_height:expression(this.scrollHeight > 620 ? "620px" : (this.scrollHeight < 40 ? "40px" : "auto"));}

IE6支持Max-Height和支持Min-Height CSS代码
_height:expression(this.scrollHeight > 620 ? "620px" : (this.scrollHeight < 40 ? "40px" : "auto"));

说明:以上代码作用是让对象的最小高度为40px,最大高度为620px的CSS样式属性

让IE6支持min-height,max-height等的方法的更多相关文章

  1. 让ie6支持fixed最简单和实用的方法

    <!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8& ...

  2. How to limit Dialog's max height?

    1. We can make it to play trick in code. At Dialog's show function, after app has set contentView, w ...

  3. [Algorithm] Find Max Items and Max Height of a Completely Balanced Binary Tree

    A balanced binary tree is something that is used very commonly in analysis of computer science algor ...

  4. js不需要知道图片宽高的懒加载方法(经过实际测试,不加宽高仍然是无法正常加载的,设置height:auto,height:100%,仍然显示高度为0)

    js不需要知道图片宽高的懒加载方法 懒加载是如何实现的? - 简书https://www.jianshu.com/p/e86c61468285找到一个不需要知道图片宽高的懒加载方法了(经过实际测试,不 ...

  5. 是什么让.NET7的Min和Max方法性能暴增了45倍?

    简介 在之前的一篇文章.NET性能系列文章一:.NET7的性能改进中我们聊到Linq中的Min()和Max()方法.NET7比.NET6有高达45倍的性能提升,当时Benchmark代码和结果如下所示 ...

  6. 设置height:100%无效的解决方法

    设置height:100%无效的解决方法 刚接触网页排版的新手,常出现这种情况:设置table和div的高height="100%"无效,使用CSS来设置height:" ...

  7. (转载)IE6支持透明PNG图片解决方案:DD_belatedPNG.js

    DD_belatedPNG.js 是一个能是IE6支持p显示ng透明图片,而且还支持背景循环(background-repeat)和定位(backgrond-position) ,支持focus,Ho ...

  8. IE6支持max-height及min-height解决方法

    我们在写CSS的时候,常常会遇到让一个图片或一个布局不能超出设定一定高度范围值,有时也需要设置一个最小高度值,以达到对齐等样式.接下来为大家总结的如何解决IE6不支持max-height和不支持min ...

  9. 使用DD_belatedPNG让IE6支持PNG透明图片

    使用DD_belatedPNG让IE6支持PNG透明图片 众所周知IE6不支持透明的PNG图片,而PNG图片在Web设计方面表现力上,具有其它图形格式所达不到的效果,IE6这一致命缺陷极大地限制了We ...

  10. 拉动滚动条追加内容,无限延伸document高度 $(window).scroll(function(){if($(window).scrollTop() + $(window).height() == $(document).height()) { $("body").append(html) } })

    $(document).ready(function() { // endless scrolling $(window).scroll(function() { if($(window).scrol ...

随机推荐

  1. RHCE7 -- IPv6

    IPV6地址一个128位数字   如果在IPv6地址后面包括TCP和UDP网络端口,建议将IPv6放在方括号中,以便区分: [2001:db8:0:10::1]:80   IPv6的标准子网掩码是&q ...

  2. OAF_OAF控件系列5 - Train的实现(案例)

    2014-06-02 Created By BaoXinjian

  3. __attribute__中constructor和destructor

    1.前言 最近看到一份代码,看到一个函数前面用__attribute__((destructor))修饰,当时感觉有点怪怪的,搜了整个程序,也没发现哪个地方调用这个函数.于是从字面意思猜想,该函数会在 ...

  4. Latex--TikZ和PGF--高级文本绘图,思维绘图,想到--得到!

    Latex--TikZ和PGF--高级文本绘图,思维绘图,想到--得到! TikZ和PGF是一种用在TeX上的CLI绘图工具.CLI和GUI是两种常见的绘图方式,前者是所想即所得(WYTIWYG)的, ...

  5. sql 跨表修改的方式

    update xhj_mon_job_log a set person_id = (select id from xhj_mon_job_manage b where a.task_id = b.id ...

  6. xcode cocos2dx 3.x mac工程 当assert(cond)触发断点,但cond却为0

    xcode cocos2dx 3.x mac工程 当发生assert(cond)触发断点,但查看cond值却为0的诡异情况时,clean再重新build就好了.

  7. scala-trait实现AOP编程

    步骤1:声明表示基本动作方法的模块Taction //声明表示基本动作方法的模块Taction trait TAction { def doAction } 步骤2:定义一下加入了前置处理和后置处理的 ...

  8. 给 Android 开发人员的 RxJava 具体解释

    鉴于 RxJava 眼下这样的既火爆又神奇的现状,而我又在一年的使用过程中对 RxJava 有了一些理解,我决定写下这篇文章来对 RxJava 做一个相对具体的.针对 Android 开发人员的介绍. ...

  9. gitlab yum 源

    https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/

  10. Calendar.NET

      Please Sign up or sign in to vote.请注册或登录投票. Download Binaries 下载二进制文件 Download source 下载源代码 Introd ...