【发布时间】:2016-12-04 01:29:32
【问题描述】:
在论坛搜索和尝试了几个小时后,我得到了代码:
<html>
<head>
<title>Tester123</title>
<link href="style1.css" rel="stylesheet" type=“text/css” />
</head>
<body>
<h1> What the what? </h1>
<p>This is a paragraph. Hooray!</p>
<div class="trial">What text is this?</div>
<p>Oh hello. The CSS thing is frustrating hey?</p>
</body>
</html>
我正在尝试让 CSS 加载到 Chrome 中(从 mac)。我有 css (style1.css) 和这个文件在同一个文件夹中(都只是从我的电脑加载),我已经清除了缓存,我没有看到 Chrome Inspector(Sources)中加载任何关于CSS 和我坚持任何想法。我打开了源代码,它似乎在那里链接得很好。我已经检查了四次文件名和类型,但我什么都没有。想法?
【问题讨论】:
-
怎么知道文件没有加载?你有任何错误吗?也许您的班级
trial定义不正确。发布css文件的内容。 -
是的,它是类型属性中的引号。但是你可以删除 type 属性,因为样式表的 html5 默认值是 css 所以不需要它。