CSS 没有链接到我的 index.html

CSS not linking to my index.html

我是这方面的初学者,所以我很抱歉,因为我正在学习自己,所以请让我松懈。我在将我的 CSS 链接到我的索引时遇到问题,我想要做的就是将页面顶部的 certian 部分设为黑色,就像一个刚填充黑色的框。技术上的横幅区域。而且由于某种原因它没有链接?这是 CSS 和 HTML 代码 - 我试过在 Chrome 和资源管理器中打开但没有任何反应?请帮忙。

/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
html {
    font-family: volkorn;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
}

.top-section {
    padding: 30px 0;
    margin-bottom: 0;
    color: #000000;
    background-color: #000000;
    background-size: cover;
}

.top-section {
padding-top: 100px;
padding-bottom: 100px;
}   
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<title>Upload Festival</title>  
    <head>
  
      <!-- Meta -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="">
    <meta name="googlebot" content="index,follow">
        
    <!--css-->
    <link href="css/customization.css" rel="custom" style="text/css">
  </head>
<body class="index">
<header class="top-section" role="banner"></header>
</body>
</html>

您的 CSS 链接似乎有问题,在 rel 属性和 style 属性(不存在)中。 你有这个:

<link href="css/customization.css" rel="custom" style="text/css">

应该是这样的:

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

有关将 CSS 文件链接到您自己的网站的更多信息: http://www.w3schools.com/css/css_howto.asp

有关 LINK 标签的更多信息: http://www.w3schools.com/tags/tag_link.asp

祝你有愉快的一天!

我是初学者,那就从简单的基本概念开始吧...
使用这个 HTML 页面结构的模板:

<html>
    <head>

        <title>Page Title</title>
        <!--Link to an external resource-->
        <link rel="stylesheet" type="text/css" href="css-folder/css-file.css">

    </head>
    <body>
        <header class="top-section" role="banner"></header>
    </body>
</html>

将您的 style sheets 放入另一个文件。例如:

css-folder/css-file.css:

html {
    font-family: volkorn;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
}

.top-section {
    padding: 30px 0;
    margin-bottom: 0;
    color: #000000;
    background-color: #000000;
    background-size: cover;
}

.top-section {
    padding-top: 100px;
    padding-bottom: 100px;
}   

您现在不需要了解 conditional commentsdoctypesmeta datas
祝你好运。