Colors 更改引导网站中的部分背景颜色

Colors 更改引导网站中的部分背景颜色,colors,background,bootstrap-4,sections,Colors,Background,Bootstrap 4,Sections,在像www.teachyourselfpython.com这样的引导网站中,欢迎和参考资料部分(如果向下滚动)是白色的。也就是说,背景色是白色的 我尝试过各种方法,但我并不清楚应该把代码放在哪里,或者应该放什么,将每个部分的白色背景(但不影响其余部分)改为浅灰色 例如,页面上的“我们的资源”部分是黑色的,但我看不到将其变为黑色的代码 <!-- About Section --> <section id="about"> <div class=

在像www.teachyourselfpython.com这样的引导网站中,欢迎和参考资料部分(如果向下滚动)是白色的。也就是说,背景色是白色的

我尝试过各种方法,但我并不清楚应该把代码放在哪里,或者应该放什么,将每个部分的白色背景(但不影响其余部分)改为浅灰色

例如,页面上的“我们的资源”部分是黑色的,但我看不到将其变为黑色的代码

<!-- About Section -->
    <section id="about">
        <div class="container">

            <div class="row">
                <p></br></br></br></p>
            </div>
            <div class="row">
                <div class="col-lg-12 text-center">
                    <h2 class="section-heading">Our Resources</h2>
                    <h3 class="section-subheading text-muted">A Better way to learn Python.<h3>

                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <p>Unlike other books, websites and resources on Python, our customisable and hugely comprehensive, not to mention pedagogically tested power points, can be used by both teachers (to teach) and students for independent learning.</p>
                    <p>On subscribing to a series, interactivity and embedded videos can be accessed, together with all the python task and challenge solution files.</p>
                    <p></br></br></br></p>
                    <a href="signup.php" class="btn-block" style="text-align:center;">Sign Up Today!</a>
                </div>
                <div class="col-md-6" style="text-align:center;">
                    <div class="jetpack-video-wrapper"><iframe src='https://www.slideshare.net/slideshow/embed_code/64063652' width='80%' height='288' allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div>
                </div>
            </div>
            <div class = "row">
                <p></br></p>
            </div>
        </div>
    </section>




我们的资源 学习Python的更好方法。 与其他关于Python的书籍、网站和资源不同,我们的可定制且非常全面,更不用说经过教学测试的power points,教师(用于教学)和学生都可以使用它进行独立学习

订阅一个系列后,可以访问交互性和嵌入式视频,以及所有python任务和挑战解决方案文件





有谁能建议最好的方法来做一个非常简单的调整(简单地对主索引页),将背景的白色部分变成浅灰色

源代码:www.teachyourselfpython.com可用于演示(在何处插入内容)

我试着在每一部分下添加这个

<!-- About Section -->
    <section id="about">
        <div class="container"  style="background-color: #ce0818;opacity:0.8;">


但这会使块变为“红色”(或任何颜色),而不是网站的整个宽度,这就是问题所在。

在我们的参考资料中,您应该将背景css放在section div而不是container div中

<section id= 'about' style="background:black;padding: 60px 0;
text-align: center;">
或者可以将该css代码包含在标题标记内的页面中,例如:

    <head>

     <style>
          //write your style code here
     </style>

   </head>

//在这里写下你的风格代码

教你自己把css写在css/main.css文件中

谢谢!有没有可能解决这个问题?
<link rel="stylesheet" href="styles.css">
body{
background:#cccccc;
}

#about{
   background: #24242a;
   padding: 60px 0;
  text-align: center;
  }
    <head>

     <style>
          //write your style code here
     </style>

   </head>