[英]body width 100% of page not screen
我的页面正文中的背景图片设置为右下角。 但是,当页面中的内容延伸到屏幕之外时,背景图像将停在屏幕边缘,而不是实际内容的结束位置。
这是相关的CSS:
html, body {
margin : 0;
padding : 0;
font-family : arial, sans-serif;
background-color : #15242d;
height: 100%;height:auto;
min-width: 100%;width:auto;
font-size: 15px;
color: #959595;
}
body {
background-image : url(images/body_bkg.gif);
background-repeat: no-repeat;
background-position:right bottom;
}
解决此问题的最佳方法是什么?
如果您还没有,则需要将网站内容包装在一个包含div
,该div
会扩展为内容的大小。 然后,您需要将背景图像应用于该div
,而不是将其放在body
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.