ie7没有加载我的样式表 [英] ie7 is not loading my stylesheet

查看:58
本文介绍了ie7没有加载我的样式表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个适用于firefox和chrome的页面。在IE7中,我遇到了一个相当有趣的行为,样式表没有加载。但是,如果我按CTRL F5,它会。

I have a page that works on firefox and chrome. In IE7 i'm experiencing a rather interesting behavior, the stylesheet does not load. However, if I press CTRL F5, it does.

这至少可以说是非常烦人。

This is very annoying to say the least.

有谁遇到过这个问题?任何建议?

Anyone experience this issue? any recommendations?

仅供参考:页面使用JQuery和普通的javascript,有完整的CSS元素定位和相对的整个条件HTML(分离IE特定的javascript,因为IE7不会响应以及与IE阴影过滤器结合使用时的一些jQuery效果,以及加载特定于IE的样式表,这些样式表解决了一些与f-ed相关的定位相关规范违规。

FYI: The page uses JQuery and plain javascript, has CSS elements positioned absolutely and relatively throughout, conditional HTML (to separate IE specific javascript because IE7 will not respond well to a few jQuery effects when combined with IE shadow filter and also to load an IE-specific stylesheet which addresses some of the f-ed up positioning-related spec violations).

推荐答案

IE只是缓存css而不是检查新的css,因为它具有相同的名称。为了强制加载新的css,您必须更改名称。很多时候人们会做一个版本号来绕过这个IE:

IE is just caching the css and not checking for a new one since it has the same name. In order to force the new css to load, you will have to change the name. Often times people will do a versioning number to get around this bit of IE:

mySheet.001.css
mySheet.002.css
...etc.

这种方式会在您第一次更改版本号时为所有用户重新加载 - 只需一定要更改参考。

This way it will be reloaded for all of your users the first time you change the version number - just be sure to change the reference as well.

这篇关于ie7没有加载我的样式表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆