Windows Embedded CE 6.0 Internet Explorer CSS

时间:2022-08-11 17:36:04

Something strange seems to be happening with IE on Windows Embedded CE 6.0 that I can't explain. I have tag in my page something like this:

IE Embedded在Windows Embedded CE 6.0上似乎发生了一些奇怪的事情,我无法解释。我的页面中有这样的标记:

<LINK href="~/getStyleSheet.aspx" type="text/css" rel="stylesheet" />

When I open this page on the device the page looks totally wrong (like it doesn't have any styling). After some fiddling around I changed it to be:

当我在设备上打开此页面时,页面看起来完全错误(就像它没有任何样式)。经过一些摆弄我改变它是:

<LINK href="~/getStyleSheet.css" type="text/css" rel="stylesheet" />

And just created a static .css file with the appropriate contents. That made it worked.

然后创建一个带有适当内容的静态.css文件。这使它成功了。

So it seems that IE is ignoring styling if it doesn't come from a file with a .css extension. Any one have any thoughts on this? Is this by design? Is there a way around this?

因此,如果它不是来自具有.css扩展名的文件,IE似乎忽略了样式。有没有人对此有任何想法?这是设计的吗?有没有解决的办法?

Thanks for any help in advance!

在此先感谢您的帮助!

1 个解决方案

#1


0  

It looks like it is related to HTTP headers. I narrowed it down to the Cache-Control header. When it is Cache-Control: no-cache the CSS doesn't get applied. If it is Cache-Control: private then the CSS does get applied.

看起来它与HTTP标头有关。我将其缩小到Cache-Control标头。当它是Cache-Control:no-cache时,CSS不会被应用。如果它是Cache-Control:private,那么CSS确实应用了。

#1


0  

It looks like it is related to HTTP headers. I narrowed it down to the Cache-Control header. When it is Cache-Control: no-cache the CSS doesn't get applied. If it is Cache-Control: private then the CSS does get applied.

看起来它与HTTP标头有关。我将其缩小到Cache-Control标头。当它是Cache-Control:no-cache时,CSS不会被应用。如果它是Cache-Control:private,那么CSS确实应用了。