我一定很累了。 CSS 不会导入到 HTML 中。显示的全部内容是:测试测试测试(在不同的行上)此外,在网格 CSS 中只有 920.gs:
<!DOCTYPE html>
<html>
<head>
<title>Some title</title>
<link rel="stylesheet" type="text/css" href="/css/styles.css" />
</head>
<body>
<div class="container_12" id="content">
<div class="grid_3" id="leftside">
<h1>Test</h1>
</div>
<div class="grid_6">
<h1>Test</h1>
</div>
<div class="grid_3" id="rightside">
<h1>Test</h1>
</div>
</div>
</body>
</html>
添加 CSS:
@import url("http://fonts.googleapis.com/css?family=Days+One&effect=font-effect-fire- animation");
@import url("css/grid.css"")
body {
background-attachment:fixed;
background-repeat:no-repeat;
background-color:#7FA8FF;
background-position:top;
background-image:url("../images/background.png");
text-align: center;
font-family: 'Days One', sans-serif;
}
最佳答案
尝试从 css
路径中删除前导斜杠:
<link rel="stylesheet" type="text/css" href="css/styles.css" />
这将假设您的网络应用程序的根目录下有一个 css
文件夹,与 HTML 页面处于同一级别。
关于html - CSS 未导入 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14226169/