【发布时间】:2017-05-20 06:45:30
【问题描述】:
我不知道为什么我的 html 不响应我的样式表。请帮忙! html 和样式表都在同一个文件夹中。
<!DOCTYPE html>
<html>
<head>
<title>First try</title>
<link type=“text/css” rel=“stylesheet” href=“stylesheet.css”/>
</head>
<body>
<h1>My first html </h1>
<p>I wish it works!</p>
</body>
</html>
【问题讨论】:
-
您的报价 - 至少在本例中 - 不是实际报价。另外,你的样式表和你的页面在同一个文件夹中吗?
-
我要检查的第一件事是我在
type=“text/css”等中看到的花哨的引号。 -
不要在 Word 上“编码”...
-
如果您确实需要编码,请使用支持 UTF-8 编码的纯文本编辑器。在 Windows 中,Notepad++ (notepad-plus-plus.org) 可能是您最初最好的免费镜头。在 macOS 中,来自 App Store 的 TextWrangler 与此类似。对于 GNU/Linux...呃...基本上所有内容,可能是 Gedit 或等效的。