如何获取背景图片以覆盖div并且不重复? [英] How do I get the background picture to cover the div and not repeat?
本文介绍了如何获取背景图片以覆盖div并且不重复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望背景能够覆盖页面并显示为统一的图片。
我尝试了什么:
如果我把
background-repeat:不重复;
background-size:封面;
然后图片显示在左上角,并没有覆盖整个页面。如果我取出background-repeat属性,图片会重复,但会覆盖整个页面。我该如何解决这个问题?在此先感谢。
解决方案
查看此内容:如何创建整页图片 [ ^ ]
I want the background to cover the page and show as one unified picture.
What I have tried:
If I put
background-repeat: no repeat;
background-size: cover;
then the image shows in the top left corner and does not cover the whole page. If I take out the background-repeat attribute, the picture repeats itself but covers the entire page. How do I solve this? Thanks in advance.
解决方案
Check this out: How To Create a Full Page Image[^]
这篇关于如何获取背景图片以覆盖div并且不重复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文