ie不支持max-height的解决之法

来源:互联网 发布:淘宝网官方网站登录 编辑:程序博客网 时间:2024/04/30 15:53

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的效果


摘自:http://zwm1104.blog.163.com/blog/static/1147333220103123839613/

原创粉丝点击