本文介绍了可疑,媒体查询和IE9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在 SUSY 中,您使用了什么(如果有)垫片来使魔术网格正确响应.在IE8及更低版本中?

I was wondering what (if any) shims you use to get the magic grids to respond correctly in SUSY in IE8 and under?

在非敏感网站上,我一直使用 moderizr 或Google的填充程序,它们可以按预期工作.我正在第一个SUSY网站上进行搜索,对最大尺寸的媒体查询不会出现.

On non-susy sites I've always used moderizr or the shim from google and they worked as expected. I'm working on my first SUSY site and the media queries for the largest size won't kick in.

http://dev.apehangar.com

推荐答案

我不清楚您要寻找哪种垫片".我不知道让IE8中使用MQ的任何好方法,但是Susy确实可以选择回退类下的输出样式.这些样式不会动态响应,但是您可以使用它来向IE发送一个桌面站点:

It's not clear to me what sort of "shim" you are looking for. I don't know any good way to make MQs work in IE8, but Susy does have an option to output styles under a fallback class. Those styles wont respond dynamically, but you can use it to send IE a desktop site:

.page {
  width: 20em;
  @include at-breakpoint(30em 12 no-mediaqueries) {
    width: 70em;
  }
}

将输出:

.page { width: 20em; }
@media (min-width: 30em) { .page { width: 70em; } }
.no-mediaqueries .page { width: 70em; }

您可以将"no-mediaqueries"替换为所需的任何后备类.只需确保使用Modernizr或IE条件注释应用该类即可.

You can replace "no-mediaqueries" with any fallback class you want. Just make sure that class is applied using Modernizr or IE conditional comments.

这篇关于可疑,媒体查询和IE9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 14:50