我試圖在我的jumbotron的rebecca-purple背景顏色上獲得重複背景圖像。我知道我做錯了什麼,只是不知道它是什麼。這裏的代碼:Bootstrap - 用背景顏色jumbotron重複圖案疊加
.jumbotron {
background-color: rebeccapurple;
color: white;
width: auto;
height: 350px;
margin-bottom: 100px;
position: relative;
display: block;
font-family: FontAwesome;
}
.jumbotron::after {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(\images\bg_images\maze_white.png) repeat center center;
z-index: -1;
}
所有幫助表示讚賞。謝謝。
問題是什麼? – Swellar
你的迷宮不應該超過紫色嗎? z-index:-1將其放在下面。可能你想要你的:有了紫色背景之後,還有大膽的迷宮。 – DrunkWolf
@Tesseract - 問題不起作用。我嘗試在下面的解決方案周圍交換bg-s,但無濟於事。只要得到一個沒有寫上任何東西的紫色電子槍。 – n0de