ie不支持max-height的解决之法
.div{ max-height: 100px; _height:expression(this.scrollHeight > 100 ? "100px" : "auto"); overflow-y:auto; } 这样就可以让div在ie和firefox中都实现max-height的效果
.div{ max-height: 100px; min-height:60px; _height:expression(this.scrollHeight > 100 ? "100px" : ( this.scrollHeight < 60 ? "60px" : "auto")); overflow-y:auto; } 这样就可以让div在ie和firefox中都实现max-height和min-height的效果
<html>
<head>
<title></title>
<head>
<body>
<div style="max-height:300px;_height:expression(this.scrollHeight>100?'100px':'auto'); overflow:auto;">
a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>a<br>
</div>
<body>
</html>
1、IE6支持max-height解决方法 - TOP
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解决方法 - TOP
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支持css 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方法 - TOP
让所有浏览器包括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样式属性
ie不支持max-height的解决之法的更多相关文章
- Oracle存储过程中不支持DML语言的解决方法(针对遇见的DROP关键字)
---存储过程中的原语句: ---删除表 DROP TABLE A_NEWTDDATA; --报错 经查询:存储过程不支持DML语言: 解决方法: execute immediate 'DROP TA ...
- win10 家庭版不支持gpedit.msc的解决办法
win10 家庭版不支持gpedit.msc的解决办法 1.建立一个批处理文件内容如下: @echo off pushd "%~dp0" dir /b %systemroot%\W ...
- "字体arial不支持样式regular"的解决方法
软件报错,提示“字体arial不支持样式regular”的提示,这是由于字体arial缺失导致的, “字体arial不支持样式regular”的解决方法如下: 方法/步骤 1.用户需要先下载arial ...
- ASP.NET MVC 此安装不支持该项目类型解决方法
http://www.cnblogs.com/younggun/archive/2011/03/03/1969498.html ASP.NET MVC 此安装不支持该项目类型解决方法 打开 .csp ...
- 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 ...
- [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 ...
- Ubuntu不支持rpm安装软件解决方法
Ubuntu不支持rpm安装软件解决方法 以前经常使用的是RedHat Linux,习惯使用rpm方法安装软件.最近发现Ubuntu系统居然不支持rpm方法安装软件,提示信息如下: root@root ...
- 故障模块名称: NetdiskExt64.dll的解决之法
故障模块名称: NetdiskExt64.dll的解决之法 2013年8月5日 开机,资源管理器报错.详细报错信息如下: 问题签名: 问题事件名称: APPCRASH 应用程序名: ...
- 关于TD邮件功能不能发到认证邮箱的解决之法
[原创] 关于TD邮件功能不能发到认证邮箱的解决之法 认证邮箱, 邮件服务器, 用户, 邮件系统 鉴于不少同行询问TD发邮件的问题,今天重新更新一下说明 解决问题的原则如下一.在TD服务器上安装一个邮 ...
- [转载]tomcat的配置文件server.xml不支持中文注释的解决办法
原文链接:http://tjmljw.iteye.com/blog/1500370 启动tomcat失败,控制台一闪而过,打开catalina的log发现错误指向了conf/server.xml,报错 ...
随机推荐
- 【LOJ】 #2033. 「SDOI2016」生成魔咒
题解 就是字符集较大需要离散化和建边表的后缀自动机水题 每次会加入i个新的串,其中重复的就是i的父亲节点所在节点的长度,减掉即可 代码 #include <iostream> #inclu ...
- hdoj1171 Big Event in HDU(01背包 || 多重背包)
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=1171 题意 老师有一个属性:价值(value).在学院里的老师共有n种价值,每一种价值value对应着 ...
- Cordova 打包签名
1.第一步 在项目根目录下运行命令cordova build --release android,会在testApp\platforms\android\build\outputs\apk目录下生成一 ...
- ThinkPHP join() table()方法的使用,多表查询
ThinkPHP模型类比较常用的两个方法,table() join() table 1 $list = M()->table('user1 a, user2 b')->where('a. ...
- webview内部跳转判断
重写webview内的方法 webView.setWebViewClient(new WebViewClient() { @Override // 在点击请求的是链接是才会调用,重写此方法返回true ...
- 三、redis系列之事务
1. 绪言 Redis也提供了事务机制,可以一次执行多个命令,本质是一组命令的集合.一个事务中的所有命令都会序列化,按顺序地串行化执行而不会被其他命令插入,不许加塞.但Redis对事务的支持是部分支持 ...
- eclipse 设置文本模板
1.开打点击Windows选择Prederences选项卡 2.弹出窗口,选择Java选项卡下的Code Style选项卡 3.选择Code Templates选项卡 打开Code选择,选择New J ...
- [leetcode sort]148. Sort List
Sort a linked list in O(n log n) time using constant space complexity. 以时间复杂度O(n log n)排序一个链表. 归并排序, ...
- 【BZOJ 2688】 2688: Green Hackenbush (概率DP+博弈-树上删边)
2688: Green Hackenbush Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 42 Solved: 16 Description ...
- bzoj1814: Ural 1519 Formula 1 动态规划 插头dp
http://acm.timus.ru/problem.aspx?space=1&num=1519 题目描述 一个 m * n 的棋盘,有的格子存在障碍,求经过所有非障碍格子的哈密顿回路个数. ...