gpt4 book ai didi

html - 无论我尝试什么,将 CSS 与 Bootstrap 一起使用都行不通

转载 作者:太空宇宙 更新时间:2023-11-04 13:07:34 25 4
gpt4 key购买 nike

我正在使用 Bootstrap 库来创建我的网站,我想使用 CSS 来修改部分布局,例如背景颜色和超大屏幕的颜色,但没有任何方法可以使它起作用。
如何将 CSS 与 Bootstrap 一起使用。

.jumbotron 
{
background-color:red !important;
}

#body
{
background-color:black;
}


<body>
<div class="body">
<div class="jumbotron">
<div class="container text-center">
<p>"Quote goes here"</p>
<h1>Site name</h1>
<p>Motto and slogan goes here</p>
</div>
</div>
</div>
</body>

谢谢

最佳答案

你有没有把你的CSS包裹在样式标签中?

<style type="text/css">
.jumbotron
{
background-color:red !important;
}

body
{
background-color:black;
}
</style>
<body>
<div class="body">
<div class="jumbotron">
<div class="container text-center">
<p>"Quote goes here"</p>
<h1>Site name</h1>
<p>Motto and slogan goes here</p>
</div>
</div>
</div>
</body>

results

关于html - 无论我尝试什么,将 CSS 与 Bootstrap 一起使用都行不通,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38552522/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com