输入banner图图片脚本导航/分类

网页背景图片全屏设置_html/css_WEB-ITnose

1.首先设置body的高度为100%,overflow属性设为hidden(溢出隐藏)

2.body内div宽和高都设为100%,overflow属性设为hidden ,z-index:-1(确保背景图片在最下面)

3.设置div内的img宽高都为100%;

html 代码如下:

css代码如下:
body { background: #888 none repeat scroll 0 0; font-family:'Microsoft YaHei'; height:100%; margin:0; padding:0; overflow:hidden;}.lay_background { width:100%; height:100%; z-index:-1; overflow:hidden;}.lay_background_img { width:100%; height:100%;}