首页 > 其他 > 详细

min-height最小高度的实现(兼容IE6、IE7、FF)(解决IE6不兼容min-height)

时间:2015-10-14 21:15:00      阅读:234      评论:0      收藏:0      [点我收藏+]

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="Author" content="胡超">
<title>super胡</title>
<style>
div{
background:#ccc;
min-height:100px; /*高度最小值设置为:100px IE6不识别min-height 和min-width*/
height:auto !important; /*兼容FF,IE7也支持 !important标签 !important只是对于ie6不认识,IE6执行height:100px;其他浏览器执行height:auto !important;!important权重最高,相当于写在最下面*/
height:100px; /*兼容ie6*/
overflow:visible;
width:100px;
}
</style>
</head>
<body>
<div>
喝水为什么会中毒?
</div>
<br/>
<div>
喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?喝水为什么会中毒?
</div>
</body>
</html>

min-height最小高度的实现(兼容IE6、IE7、FF)(解决IE6不兼容min-height)

原文:http://www.cnblogs.com/12606huchao/p/4878464.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!