2014-10-03 61 views
0

我有一个背景图像,我通过将background-size: 80%;添加到我的CSS代码作出了响应。当我最小化浏览器窗口时,它在某种程度上起作用,问题是:我希望背景图像在某个点停止减少,就像我网站上的其他元素一样。但它无限减少。为了说明我的意思,请在我的网站上查看:http://www.filmfutter.com/forum/ 这是顶部的白色图像。停止响应的背景图像从某个点减少

目前的CSS代码看起来像这样:

background-image: url(../images/blueTemptation/blueTemptationHeader.png); 
background-size: 80%; 
background-repeat: no-repeat; 
background-position: top center; 
+1

我会调查CSS中的媒体查询的用法,以便在窗口缩小到一定大小时更改应用样式。 – 2014-10-03 21:18:51

回答

1

你可能会在特定点添加媒体查询断点。给定的像素值是近似值。

@media only screen and (max-width: 1140px) { 
    body { 
    background-size: 897px; 
    } 

}