我要在网站的主体上使用我的CSS图像:
body {
background-color: #000;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(image.jpg);
background-repeat: no-repeat;
background-position:center top;
}
调整浏览器大小时,我希望看到滚动条出现,以便可以滚动图像。我想念什么?
您应设置min-width
并min-height
为您的body
基于宽度和图像的高度:
body {
background-color: #000;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(http://theactsoftheapostles.com/images/yesu-ki-jai-bg.jpg);
background-repeat: no-repeat;
background-position:center top;
min-width: 1390px;
min-height: 903px;
}
但是我认为最好避免使用水平滚动条。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句