【问题标题】:Respond CSS Not Working Properly响应 CSS 无法正常工作
【发布时间】:2013-07-30 01:25:18
【问题描述】:

我正在使用 https://github.com/scottjehl/Respond 来帮助我的浏览器兼容响应式媒体查询,但它似乎不适用于 I.E.

respond.src.js 文件与 index.html / style.css 位于同一文件夹中。

<head>
<meta charset="utf-8" />
<link href="style.css" rel="stylesheet"/>
<script src="respond.src.js"></script>
</head> 

如果我在这里做错了什么有什么想法吗?

然后我只是添加一个 iFrame。

<body>

    <iframe src="http://instagram.com/p/cR5BORA8Ij/embed/" width="300" height="400" frameborder="0" scrolling="no" allowtransparency="true" id="myFrame"></iframe>  

</body>

iFrame 似乎无法在 IE 8 中加载。

【问题讨论】:

  • 你确定你的项目中有respond.src.js,还是有respond.min.js
  • 是的,我有那个文件。难道是因为我也在使用 iFrame 吗?
  • 你能完整地展示你的代码吗? (与此有关)

标签: html css iframe media


【解决方案1】:

参考这个链接:

https://github.com/scottjehl/Respond

引用:

据报道,如果 CSS 文件以 UTF-8 和字节顺序标记 (BOM) 编码,它们将无法与 IE7 或 IE8 中的 Respond.js 一起使用。在第 97 期中注明

【讨论】:

  • 试试是否可以使用 ASCII 或 ISO-8859-1
  • 什么意思?我认为这是我的 iFrame 问题。
  • 尝试使用“样式”属性而不是宽度:&lt;iframe src="http://instagram.com/p/cR5BORA8Ij/embed/" style="width:300; height:400" frameborder="0" scrolling="no" allowtransparency="true" id="myFrame"&gt;&lt;/iframe&gt;
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-14
  • 2015-10-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多