我试图弄清楚如何测试我的代码如何工作,但我似乎无法弄清楚为什么他们不会链接。它们在同一文件夹中。我也在尝试向此页面添加一个Facebook像素和分析功能。我会将该代码嵌入到HTML文件中吗?

提前致谢

这是我的代码

HTML

<!DOCTYPE html>

<head>
        <title>Full Screen Landing Page</title>
        <link href rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
    <section class="intro">
        <div class="inner">
            <div class="content">
            <h1>Welcome To The Tribe</h1>
            <a class="btn" href="#">Get Started</a>
            </div>
        </div>
    </section>


</body>
</html>

@import url('https//fonts.googleapis.com/css?family=Raleway');
@import url('https//fonts.googleapis.com/css?family=Oswald');


html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;

}

.intro{
    height: 100%;
    width: 100%;
    margin: auto;
    background: url() no-repeat 50% 50%;
    display: table;
    top: 0;
    background-size: cover;
}

.intro .inner{
    display: table-cell;
    vertical-align: middle;
    width: 100%;
    max-width:none;
}

最佳答案

不是<link href rel="stylesheet" href="style.css">

它的

<link rel="stylesheet" href="style.css">


它读取初始href值,因为它为空,不读取任何CSS文件

关于html - 麻烦将我的样式表与HTML文件集成,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/45580345/

10-12 12:26
查看更多