Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
应用于html标记的颜色不起作用,还有一个isuue_Html_Css - Fatal编程技术网

应用于html标记的颜色不起作用,还有一个isuue

应用于html标记的颜色不起作用,还有一个isuue,html,css,Html,Css,我面临一些问题。 我将我所有的html代码都包含在一个名为“containment”的div中,然后我使用css在html标记上应用了颜色,但它在任何部分上都不应用颜色,并且显示了类似这样奇怪的东西 我刚刚占用了整个页面的940px,但它占用了x轴上的所有可用宽度,如图所示。 此外,框大小:边框框属性根本不起作用 请帮我找出我的错误 html代码 <!DOCTYPE html> <html lang="en"> <head> <meta c

我面临一些问题。 我将我所有的html代码都包含在一个名为“containment”的div中,然后我使用css在html标记上应用了颜色,但它在任何部分上都不应用颜色,并且显示了类似这样奇怪的东西

我刚刚占用了整个页面的940px,但它占用了x轴上的所有可用宽度,如图所示。 此外,框大小:边框框属性根本不起作用

请帮我找出我的错误

html代码

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->

            <link href="css/bootstrap.min.css" rel="stylesheet" >
<meta name="viewport" content="width=device-width, initial-scale=1">
       <link href="css/practice.css" rel="stylesheet" >


    </head>
  <body>

    <div class="containments">

    <header>
        <h1>HTML</h1>
        <p>Slogen Here</p>
    </header>

            <div class="content-area group">
                <div class="main-area">

            <p>it is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like</p>

            <p>it is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like</p>

                </div>
                <aside class="slidebar">

            <p>it is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop </p>
            </aside>

        </div>

        <footer>
        <p>&copy; 2015 -E Learning</p>
    </footer>



  </body>
 </div>
  </html>

似乎您的标签序列不正确

在关闭与容器相关的div之前关闭body

查看您的底部代码

  </footer>
</body>
</div>
</html>

我无法重现您的错误,请检查此项。您可以看到,我将一些透明背景添加到了。容器和行为似乎与预期的一样。@solucionesintuitiv,因为我仍然面临相同的问题。甚至连背景的css都不能像你告诉我的那样工作。我想这是我的浏览器问题。你怎么想?你用的是哪种浏览器?我用的是浏览器11和chrome,你能做一个代码笔让我检查你的确切代码吗?嘿!现在我面临一个不同的问题。
  </footer>
</body>
</div>
</html>
</footer>
 </div>
</body>
</html>
body {
   margin: 0px;
   padding: 0px; 
   background-color: green;
}