html - 如何修复部分背景颜色
问题描述
对于我之前在这篇文章中的错误,我深表歉意。我无法理解为什么我的 Small-bio 部分的背景颜色没有改变。我觉得这与引导轮播有关,但 idk。我希望能够理解我做错了什么以及如何避免这种情况再次发生。任何帮助将不胜感激。
谢谢你
我尝试更改其他部分的颜色并更改高度,并且我已经移动了样式表。
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Bagwell Productions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="height=device-height, initial-scale=1.0">
<!-- Google Font -->
<link href="https://fonts.googleapis.com/css?family=Montserrat|Ubuntu" rel="stylesheet">
<!-- CSS & bootstrap stylesheet -->
<link rel="stylesheet" href="Bagwell\style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!-- JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</head>
<body>
<section id="navbar">
<!-- Nav Bar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">Bagwell Productions</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav ml-auto">
<a class="nav-item nav-link active" href="#">Home <span class="sr-only">(current)</span></a>
<a class="nav-item nav-link" href="#">Gallery</a>
<a class="nav-item nav-link" href="#">About Me</a>
<a class="nav-item nav-link" href="#">Contact Me</a>
</div>
</div>
</nav>
</section>
<section id="slideshow">
<!-- slideshow -->
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="C:\Users\ghost\Desktop\Projects\Bagwell\wetransfer-876787\126A0171.JPG" alt="league of extraordinary women" style="width:100%" style="height:auto" ; class="d-block w-100">
</div>
<div class="carousel-item">
<img src="C:\Users\ghost\Desktop\Projects\Bagwell\wetransfer-876787\IMG_3732.JPG" alt="Grad Pics" style="width:100%" ; style="height:auto" class="d-block w-100">
</div>
<div class="carousel-item">
<img src="C:\Users\ghost\Desktop\Projects\Bagwell\wetransfer-95bb54\IMG_9997.JPG" alt="pit bull" style="width:100%;" style="height:auto" "class=" d-block w-100"">
</div>
<div class="carousel-item">
<img src="C:\Users\ghost\Desktop\Projects\Bagwell\wetransfer-95bb54\IMG_7098.JPG" style="width:100%;" style="height:auto" class="d-block w-100">
</div>
<div class="carousel-item">
<img src="C:\Users\ghost\Desktop\Projects\Bagwell\wetransfer-876787\IMG_1938.JPG" alt="walking" style="width:100%;" style="height:auto" class="d-block w-100">
</div>
<div class="carousel-item">
<img src="C:\Users\ghost\Desktop\Projects\Bagwell\wetransfer-876787\IMG_1749.JPG" alt="nasa grad" style="width:100%;" style="height:auto" class="d-block w-100">
</div>
</div>
<!-- controls for slideshow -->
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</section>
<!-- Small intro -->
<section id="small-bio">
<div class="Bottom-intro">
<h3>Welcome to the photography portfolio of William Bagwell. the Gallery's in this website showcase professional work in different settings.</h3>
</div>
</section>
</body>
</html>
#small-bio{
background-color: blue !important;
}
#slideshow{
overflow: hidden;
}
#slideshow{
overflow: auto;
}
}
h3{
background-color: blue;
}
.carousel-inner{
overflow: ;
padding-bottom: 7%;
background-color: red;
overflow: hidden;
}
.Bottom-intro{
position: relative;
overflow: hidden;
height: 300px;
width: 100%;
color:#fff;
background-color: #ef8172;
text-align: center;
}
```
解决方案
看看你的 style.css 链接
<link rel="stylesheet" href="Bagwell\style.css">
改正为
<link rel="stylesheet" href="Bagwell/style.css">
有帮助吗
推荐阅读
- javascript - 如何以编程方式绘制粗线 JavaScript?
- c# - 将相对源根父控件的属性绑定到子类的附加属性 - 使应用程序崩溃
- vagrant - 配置脚本运行后同步文件夹?
- excel - 在excel中查找每一行和每一列的相交值
- javascript - React Dropdown acessibility onClick
- xcode - Casting NSSEt in an conditional statement
- python - Unexpected indent and other errors
- python - Topic modelling with gensim
- python-3.x - Capping the outliers
- python-3.x - Create new Z-Score column based off unique text values in an existing column