我一直在复制和粘贴 HTML 和 CSS 教程来尝试完成这项工作,现在我已经做到了;
页面(HTML)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<body>
<h1>1This site</h1>
<p>Welcome to the this site</p>
</body>
</html>
样式.css
body {background-image:url(“Background.png”);}
h1 {font-family:Arial, sans-serif;}
当我在 safari 中加载 html 时,它看起来仍然没有格式化。
提前致谢!
最佳答案
检查你是否设置了正确的路径 如果您仍然有问题,请尝试为其使用填充路径:
<link rel="stylesheet" type="text/css" href="http://127.0.0.1/test/style/style.css" />
关于html - 我的 HTML 文档没有正确链接到我的 CSS 样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23178179/