背景图片覆盖整个页面 [英] background image to cover the entire page
本文介绍了背景图片覆盖整个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有上述图片
我必须设置它,以覆盖整个页面。我尝试了下面的代码。
I have to set it in such a way that it covers the entire page. I tried the following code.
margin: 0px;
background: url(../images/common/header/Background_color.png);
background-repeat:repeat-x;
background-attachment:fixed;
background-position:top center;
height: 100%;
width: 100%;
border: 0;
display:inline-block;
background-color: transparent;
但是我得到的是这个。
But what I get is this.
不覆盖整个页面。在底部我得到了空白。任何人都可以帮助我吗?先感谢。
It is not covering the entire page. At the bottom I am getting the white space.Could anyone help me? Thanks in advance.
推荐答案
请尝试:
background-size: cover;
这篇关于背景图片覆盖整个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文