Bootstrap 3和IE框模型打破了我的布局

时间:2013-12-06 07:53:34

标签: zend-framework twitter-bootstrap-3 css

我使用Bootstrap 3和Zend Framework 1.12.3。一切正常,但在Internet Explorer 7中测试我的网站时,由于IE框模型,布局中断了。

我现在正在尝试coliff / bootstrap-ie7Schepp / box-sizing-polyfill,但我无法让它发挥作用。我已粘贴*行为:url(/public/css/boxsizing.htc);在bootstrap.css文件中的所有box-sizing属性之后,我将以下代码放在layout.phtml文件中:

<!--[if lt IE 8]>
<link href="/css/bootstrap-ie7.css" rel="stylesheet">
<![endif]-->

我还粘贴了#34; AddType text / x-component .htc&#34;在我的.htaccess文件中。

有人知道为什么这不起作用吗? 谢谢!

1 个答案:

答案 0 :(得分:1)

bootstrap-ie7.css内部是htc文件的路径。确保已将.htc本身文件上传到css或js文件夹,并将根目录中的路径放在.css中。

 First line of the -ie7.css file {box-sizing:border-box;behavior:url(/js/boxsizing.htc)}

此路径必须是您的相对根路径。如果.htc位于assets / js文件夹中,请将其放在行为url括号中。

  {box-sizing:border-box;behavior:url(assets/js/boxsizing.htc)}