CSS未进口到html

问题描述 投票:0回答:5

我一定很累。 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; }
    
html css background stylesheet grid-system
5个回答
2
投票
css

路上删除领先的斜线:

<link rel="stylesheet" type="text/css" href="css/styles.css" />

这将假设您的Web应用程序的根部在与HTML页面相同的级别上有一个
css

文件夹。


中的relative URL在

1
投票
中被解释为相对于导入样式表。 现在,如果您要显示的样式表是

"/css/styles.css"

@import url("css/grid.css"")
(不包括杂散的“”末尾“”)将寻找一个文件
/css/css/grid.css
,这可能不是您想要的。

只是猜测,但我认为这是

@import url("grid.css")
您需要
    

我有一个类似的想法,即领先的'/'可能是像Duffymo这样的问题。所以我建议使用

<link rel="stylesheet" type="text/css" href="css/styles.css" />
,但我也将删除您的CSS文件中的inclage语句,然后将其放在主要的内容中:

<link rel="stylesheet" type="text/css" href="css/grid.css" />

0
投票
可能是因为您正在调用CSS/CSS/制作CSS/CSS/GRID.CSS的CSS/GRID.CSS,但我可能错了;但是尝试并没有什么伤害。

检查是否可以下载要导入的CSS。

我无法获得以下CSS

@import url("http://fonts.googleapis.com/css?family=Days+One&effect=font-effect-fire-animation");


BRO

used保存文件

0
投票
在CSS file

Click

ctrl +s


0
投票
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.