简体   繁体   English

IE10开发人员工具导致样式丢失

[英]IE10 developer tool cause style missing

I have a page1 including page2 with "iframe" tag,both of these two pages link to the same stylesheet,everything works fine,until i press "F12" to toggle developer tool in IE10,some of the classes miss styles defined in the css file suddenly,and the two pages go into a wrong display. 我有一个带有“ iframe”标记的page1,包括page2,这两个页面都链接到相同的样式表,一切正常,直到我按“ F12”切换IE10中的开发人员工具,某些类错过了CSS中定义的样式突然出现文件错误,两页显示错误。 Can anyone help? 有人可以帮忙吗?

there are two methods to solve this problem, change the class name or add a timestamp after style url. 有两种方法可以解决此问题,更改类名或在样式url后面添加时间戳。 Why? 为什么?

This is a bug in IE10. 这是IE10中的错误。

You can add a query string in page2 to fix this bug: 您可以在page2添加查询字符串以解决此错误:

page2: 第2页:

<link rel="stylesheet" href="css/base.css?t=2013" />
<link rel="stylesheet" href="css/layout.css?t=2013" />

page1: 第1页:

<link rel="stylesheet" href="css/base.css" />
<link rel="stylesheet" href="css/layout.css" />

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

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