IE7不理解显示:内联块有人能帮我把头挪开吗?火狐运行良好,但与InternetExplorer 7不同。似乎不明白display: inline-block;.HTML:<div class="frame-header">
<h2>...</h2></div>CSS:.frame-header {
height:25px;
display:inline-block; }
3 回答

慕姐8265434
TA贡献1813条经验 获得超2个赞
更新
<html>
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]--><!--[if IE 8]><html class="no-js lt-ie9"> <![endif]--><!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]-->
.inline-block { display: inline-block;}.lt-ie8 .inline-block { display: inline; zoom: 1;}
旧答案
.frame-header{ background:url(images/tab-green.png) repeat-x left top; height:25px; display:-moz-inline-box; /* FF2 */ display:inline-block; /* will also trigger hasLayout for IE6+7*/}/* Hack for IE6 */* html .frame-header { display: inline; /* Elements with hasLayout and display:inline behave like inline-block */}/* Hack for IE7 */* + html .frame-header { display: inline; /* Elements with hasLayout and display:inline behave like inline-block */}
- 3 回答
- 0 关注
- 421 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消