我有一个案例,我希望css不在标题中,因为标题适用于所有页面,每个页面都有不同的css文件。
我有一个问题,该风格正在使用chrome和firefox,但它不适用于IE11。
我试图使用F12来调试问题,我发现了问题。
当我在IE 11上点击div class = waitingTime“时,右侧视图上的样式并不适合。
但是当我在chrome和firefox上做同样的事情时,样式出现在右边。
IE 11
铬
你可以看到添加css文件的代码高于div
更新
对于无法看到图像的人,我将其上传到http://postimg.org/image/dd2p19gkh/
http://postimg.org/image/c5a0dntvn/
更新2
这是我添加CSS的方式
<link href="http://localhost:8082/ParkingProject/public/css/waitingTimes" rel="stylesheet" type="text/css" media="all"> <div class="waitingTime"> </div>I have a case that I want the css to be in the body not in the header, because the header is for all pages and each page have a different css file.
I have a problem that the style is working on chrome and firefox but it is not working on IE11.
I tried to use F12 to debug the problem and I discovered the problem.
when I click on the div class=waitingTime" on IE 11, the style is not appeear on the right view.
but when I do the same thing on chrome and firefox, the style is appears on right.
IE 11
Chrome
you can see that the code of adding the css file is above the div
Update
For people who can't see the images, I upload them here http://postimg.org/image/dd2p19gkh/
http://postimg.org/image/c5a0dntvn/
Update 2
this is how I add the css
<link href="http://localhost:8082/ParkingProject/public/css/waitingTimes" rel="stylesheet" type="text/css" media="all"> <div class="waitingTime"> </div>最满意答案
您可以在正文(仅限HTML5)文档中使用link标记,但仅限于它们具有itemprop属性时,而不是在具有rel属性时。
因此,您的HTML无效。 它是非常好的Chrome,它意外地正确处理你的页面,但你不能责怪IE没有这样做。
另请参阅我可以在HTML文档的正文中使用<link>标记吗?
Finally I found the problem
The file is waitingTime.css but I forgot to say .css
chrome and firefox so clever to udnerstand it but IE is stupid :) so when I added .css it works
更多推荐
css,IE,div,电脑培训,计算机培训,IT培训"/> <meta name="description"
发布评论