简体   繁体   English

CSS3无法在我的网站上的IE中运行

[英]CSS3 not working in IE on my site

I am having a real hard time developing for Internet Explorer. 我很难为Internet Explorer进行开发。

Below is a snapshot of a project as it appears in IE9 and below that in Google Chrome it looks the same in Firefox as well. 下面是IE9中出现的项目快照,而在Google Chrome中下面则是Firefox。

Some of the things not working correctly in IE9 on this page... 此页面上的IE9中某些功能无法正常使用...

  • The navigation bar, the links are stuck at the top in IE instead of vertically centered 导航栏,链接停留在IE中的顶部,而不是垂直居中
  • The navigation bar does not have the box shadow applied in IE 导航栏没有在IE中应用框阴影
  • The sidebar and content boxes do not have either the shadow or beveled corners in IE 侧边栏和内容框在IE中都没有阴影或斜角
  • The Tag boxes do not have the round edges in IE 标记框在IE中没有圆形边缘
  • In the content section, notice the 2 tags "CSS" and "FONTS" on the right side of page are pushed down, in the Chrome version they are aligned. 在内容部分,请注意页面右侧的2个标签“ CSS”和“ FONTS”被向下按下,在Chrome版本中它们已对齐。

The project is not online so I can't show it but I have put the header section into a JSSFiddle page here http://jsfiddle.net/kenLs/3/embedded/result/ you can see that this JSFiddle of the header DOES work correctly in IE9. 该项目不是在线的,因此我无法显示它,但是我将标题部分放到了JSSFiddle页面中,这里是http://jsfiddle.net/kenLs/3/embedded/result/您可以看到标题的JSFiddle确实在IE9中正常工作。

That really has me confused, it works on JSFiddle but not on my site. 这确实让我感到困惑,它可以在JSFiddle上运行,但不能在我的网站上运行。 I have looked at everything I can think of to make it work correctly. 我已经仔细考虑了所有可以使它正常工作的想法。 I even added <meta http-equiv="X-UA-Compatible" content="IE=9" /> to my header. 我什至在标题中添加了<meta http-equiv="X-UA-Compatible" content="IE=9" /> I had some HTLM5 elements on my page but I replaced all them with regular div's just to test with IE, nothing I do seems to change any of these problems. 我的页面上有一些HTLM5元素,但是我用常规div替换了所有这些元素,只是为了用IE进行测试,我似乎没有做任何改变。

IE9 snapshot IE9快照
IE 9

Chrome snapshot Chrome快照
铬


I know this is hard to debug since the project is not online but if you have any ideas why this may be happening I would really love to know. 我知道这很难调试,因为该项目不在线,但是如果您有任何想法为什么会发生这种情况,我真的很想知道。


UPDATE UPDATE

I just realized that on that JSFiddle, if I turn off Compatibility view then even the header will look like the one in my image 我只是意识到,在该JSFiddle上,如果我关闭了Compatibility视图,那么即使标题也将看起来像我的图像中的标题

I also added another simple JSFiddle test that just has the code for my tags, even this little code does not work correctly in IE, I have to hit the compatibility mode for it to work otherwise the corners are square http://jsfiddle.net/j9Qe3/1/ 我还添加了另一个简单的JSFiddle测试,该测试只包含我的标签的代码,即使这个小的代码在IE中也无法正常工作,我必须点击兼容模式才能使其正常工作,否则,角落会变成方形http://jsfiddle.net / j9Qe3 / 1 /

如果它可以在jsfiddle中运行,但不能在您的站点上运行,我想知道您是在使用doctype还是在doctype之前放置了任何东西,这会使IE进入怪癖模式。

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

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