type =“text / css”之间的差异和type =" text / stylesheet" ;?
问题描述:
<link rel="stylesheet" href="/css/test.css" type="text/css"/>
和
<link rel="stylesheet" href="/css/test.css" type="text/stylesheet"/>
在不同的浏览器中,风格似乎有些不同,但我不能指向任何具体 - 在使用这些之间有什么真正的区别吗?
There appear to be some differences to the style in different browsers, but I can't really point to anything specific - is there any real difference between using either of these?
答
text / stylesheet
是 / strong>为链接
元素。
您应该使用 text / css
。
You should use text/css
.
您可能会发现浏览器有所不同,因为有些浏览器已考虑到人们可能不正确地使用 type = / stylesheet
而不是 type =text / css
。
You are probably seeing a difference in browsers because some browsers have taken into account people might incorrectly use type="text/stylesheet"
instead of type="text/css"
.