已经提出了一种使Zurb的Foundation3框架与IE7协同工作的解决方案。不一定是复杂的支持,但肯定是网格支持。
解决方案表示为:http://www.stormconsultancy.co.uk/blog/development/code-snippets/making-zurb-foundation-3-work-on-ie7/
我尝试在这里复制:http://sausag.es/foundation/grid.html
我在我的foundation.min.css中添加了一个指向htc文件的链接
引用是相对于HTML的,而不是CSS的。
我在htaccess中添加了一行关于htc文件的内容。
但是我仍然不能像在IE8中那样在IE7中显示网格。我哪里错了?
发布于 2012-10-09 04:10:56
your stylesheet中的以下行
*behavior: url(/stylesheets/box-sizing.htc);转换为以下地址:
http://sausag.es/stylesheets/box-sizing.htc它返回一个404。您可以通过将行更改为以下代码来解决此问题:
*behavior: url(/foundation/stylesheets/box-sizing.htc);或者将box-sizing.htc文件向下移动一个文件夹。
发布于 2012-12-24 06:24:13
另一个解决方案是检测带有条件注释的ie7,然后对列应用CSS fix,如下所示:
.ie7 .columns{
margin-right: -15px ;
margin-left: -15px ;
display:-moz-inline-stack;
display:inline-block;
zoom:1;
*display:inline;
}这将清除列上的填充并修复轴网。您可以在布局的其他div或部分上执行相同的操作。
此外,您还需要修复居中的列和偏移量列,如下所示:
.ie7 .row{
clear: both;
text-align: center;
}
.ie7 .offset-by-three {
margin-left:25% !important;
}
.ie7 .offset-by-seven {
margin-left:58.33% !important ;
}当然还有条件注释:
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if IE 7]> <html class="ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->https://stackoverflow.com/questions/12788381
复制相似问题