这是最愚蠢的问题,但我不知道为什么我找不到问题!下面是代码,但 css 文件未加载。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title</title>
<link rel="stylesheet" type="text/css" href="css/layout.css" />
</head>
<body>
<section id="mainWrapper">
<a href="#" class="btn btn-primary">Hello</a>
</section>
</body>
</html>
I checked the source in the browser, it cannot find the file specified! I tried to move file in the root and removed the folder name still the same. It is just the basic template that I was designing and I can't get CSS working!!!
检查文件名,有时通过PC重命名时往往会添加布局.css.txt将文件名更改为.css
.
将文件移动到 HTML 所在的根目录,暂时不要创建任何子文件夹。
请注明您是尝试上传到服务器还是只是练习,以便我们可以为您提供准确的说明。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)