ie7 absolute 高度塌陷
ie8以及以上版本中此段代码是我要达到的效果,但是ie7不知何故导致了left,right类的高度塌陷。求高手解答。怎样兼容ie7代码如下:
.content{ position: absolute; top: 20px; bottom: 20px; background-color: #eee; left: 0; right: 0;}.left{ height: 100%; width: 40%; float: left; position: relative; background-color: #888;}.right{ position: relative; height: 100%; width: 60%; float: left; background-color: #666;}.img{ width: 100px; background-color: red; height: 200px; float: right; position: relative; top: 50%; margin-top: -100px;}.detail{ width: 300px; height: 300px; float: left; position: relative; top: 50%; margin-top: -150px; background-color: green;}.clearfix{ *zoom: 1;}.clearfix:after,.content-style:after{ clear: both; content: "20"; visibility: hidden; height: 0; display: block;}
查看更多关于【ie7】下关于【absolute和float】导致高度塌陷的问题,求解_html/css_WEB-的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did112742