简体   繁体   English

使用respond.js的IE8 Media查询在localhost上工作,而不在服务器上

[英]IE8 Media queries with respond.js works on localhost not on server

I'm trying to add media queries support to IE8 and as stated in the title, respond.js is working on my local machine but not on the server. 我正在尝试向IE8添加媒体查询支持,并且如标题中所述,respond.js正在我的本地计算机上工作但不在服务器上。

  • I have the respond.js on the head, after the link to the CSS. 在链接到CSS之后,我有头部的respond.js。
  • The media queries are screen and (max-width: 940px){} 媒体查询是屏幕和(最大宽度:940px){}
  • the respond.js is being served by my server, so no x-domain issues. respond.js由我的服务器提供,因此没有x-domain问题。
  • If I disable the CSS on IE8 all the site content is shown. 如果我在IE8上禁用CSS,则会显示所有网站内容。
  • I'm using grunt to output my live files and they are being minified, css, html and js. 我正在使用grunt输出我的实时文件,他们正在缩小,css,html和js。
  • Already uploaded unminified version of HTML and CSS but no luck. 已经上传了未经编辑的HTML和CSS版本,但没有运气。

Any idea what the problem might be? 知道问题可能是什么?

I have the respond.js on the head, after the link to the CSS. 在链接到CSS之后,我有头部的respond.js。

You should place respond.js after any inline-CSS as well. 您应该在任何内联CSS之后放置respond.js A good place to put it would be at the end of body (or just before the closing html tag) 把它放在body末端的好地方(或者在关闭html标签之前)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM