CSS没有链接到我的index.html [英] CSS not linking to my index.html

查看:284
本文介绍了CSS没有链接到我的index.html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是这方面的初学者,所以我为此道歉,因为我正在学习自己,所以请给我一些懈怠。我在将CSS链接到索引时遇到问题,我要做的就是将页面顶部的certian部分设置为黑色,就像刚填充黑色的框一样。横幅区域技术上。并且由于某种原因它没有链接?这是CSS和HTML代码 - 我尝试在Chrome和资源管理器中打开,什么都没发生?请帮忙。

I'm a beginner in this so I apologise in this since I'm learning myself so please cut me some slack. I'm having a problem in linking my CSS into my index, all I'm trying to do is make a certian portion on top of the page black, like a box just filled black. The banner area technically. And it's not linking for some reason? Here is the CSS and HTML code - I've tried opening in Chrome and explorer and nothing is happening? Please help.

/*! 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>

推荐答案

我是初学者,然后从简单的基本概念开始...

使用这个HTML页面结构的模板:

I you are a beginner, then start with simple an basic concepts...
Use this template that is the structure of a HTML page:

<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>

样式表放入另一个文件中。例如:

Put your style sheets into another file. For example:

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;
}   

您无需了解条件评论 doctypes 元数据现在!

好运气好。

You don't need to know about the conditional comments and doctypes and meta datas right now!
Good luck.

这篇关于CSS没有链接到我的index.html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆