1
我有两个超大屏幕在我的网页,它的HTML:修改只是一个超大屏幕的背景
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h3 class="display-5">TEST</h3>
,我想改变只有一个颜色,但是当我编辑它的CSS方面的变化。
.jumbotron-fluid{
background-color: red!important;
}
我试图把一个id和改变背景使用它,但没有奏效。
向第一个jumbotron添加新类,如'bg-red'。在CSS中添加'.bg-red {background-color:red!important; }'。或者你可以使用这个CSS选择器,只为第一个:'.jumbotron:first-child {background-color:red!important; }' – fen1x
谢谢:)它工作! – Lucky