Why does not the background image appear in Jumbotron (Bootstrap)?

No matter how many times I’ve changed my folder and file names, made sure they are relative paths, etc., I can’t seem to have my background image appear in my Jumbotron.

I just want it to show up behind in my Jumbotron DIV, but it’s not.

Here’s my HTML:



    Mock Website
    
    
    
    



     


      

Navbar example

This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.

View navbar docs »

Here’s my CSS:

/* NAVBAR */
.navbar {
    margin-bottom: 0px;
    border-radius: 0px;
}

/* JUMBOTRON */
.jumbotron {
    background-color: ;
    background-image: url("/images/blue.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    color: #FFF;
}

.dropdown li {
    text-align: right;
}

Change and condense your CSS from background-image
to just background
to keep things nice and clean.

e.g. background: url(/images/blue.jpg) cover no-repeat;

The code itself looks functional though. Is image in the same directory? Perhaps reviewing this post will help: Links not going back a directory?

Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

阅读提示:酷辣虫无法对本内容的真实性提供任何保证,请自行验证并承担相关的风险与后果!
本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 前端开发 » Why does not the background image appear in Jumbotron (Bootstrap)?

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录