![](/img/trans.png)
[英]How to make two different div in HTML in same background image size?
[英]how to make the background the same as the div size in css
我正在開發一個網站,我需要知道如何使背景與css中的div大小相同..我正在嘗試使BG尺寸自動但它不起作用>所以任何人都知道解決方案!!
謝謝
嘗試:
{
background: url(bgimage.jpg) no-repeat;
background-size: 100%;
}
#header {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.