需要帮助在我的bootstrap / angular beginners web应用程序中设置背景图像

时间:2016-05-15 19:18:29

标签: angularjs twitter-bootstrap

新手问题:我为我的一个项目创建了一个github页面

http://grokimagecompression.github.io/grok/#/

通过从网络上复制教程并进行修改。

可在此处找到来源:

https://github.com/GrokImageCompression/grok/tree/gh-pages

我想设置背景图片,类似于此页面的处理方式:

http://blackrockdigital.github.io/startbootstrap-creative/

但到目前为止没有运气。我的gh-pages分支中的图像为img/header.jpg

非常感谢任何指导!

1 个答案:

答案 0 :(得分:2)

我会添加到css

body {
    padding-top: 50px;
    padding-bottom: 20px;

    background: url("img/header.jpg") no-repeat center cover;

}

有关背景的详细信息,请查看MDN