如何把背景图设为与窗口大小一样 <body style="background-image: url(imgName); background-repeat:repeat;"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 下面的代码的代码是一个完整的页面代码,无论你怎么调整,壁纸的大小都充满整个页面<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><div id="Layer1" style="position:absolute; left:0px; top:0px; width:100%; height:100%; z-index:1"> <table width="60%" height="300" border="0" cellpadding="0" cellspacing="0"> <tr> <td> </td> <td><img src="http://www.csdn.net/images/ad/ad-java.gif"></td> </tr> </table></div><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="http://search.microsoft.com/library/shared/toolbar/graphics/banners/MSDN_banner.gif" width="100%" height="100%"></td> </tr></table></body> 壁纸壁纸,就是背景,楼上的那个随便往body里面写点东西试试看哪?起码:z-index应该等于-1嘛而且,用width:100%,height:100%,肯定没用的,窗口长宽的属性是什么(忘了)? 我当然是试过了的啦。比如你在<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">和<div ......之间随便敲几个字母,就会看见图片被压小了一块,怎么称得上是“壁纸”哪?倒是你自己试过了没有啊?还是和我说的:做一个层做背景(比如把layer的Zindex设置到-1)里面就放一张图片然后在用户改变窗口大小的时候(或者简单点就开始执行的时候)把图片大小设置成窗口大小。试试看吧(好像有个似乎也是楼主发的帖子:http://expert.csdn.net/Expert/topic/1524/1524342.xml?temp=.8833429 我为什么要用DIV,就是为了把文字你表格什么的写在上面,便于你在页面上添加内容,所有你们想要达到的效果我都能做到! javascript一直很想明白的问题 仿51job那种城市选择的弹出层 能实现多层么? js弹出页面 动态写入页面的js为什么不能执行?有什么办法? 怎么做到在页面跳转的时候在状态栏显示动态信息? 怎样做到这样的效果?层还是iframe或者其他? javascript的日期问题,帮帮忙呀! 请问!如何将select菜单,放在页面底层(显示层的下面) 看有多少牛人,能解决我的问题。疯狂给分!!! 如何取得IE窗口中任何一对象的X与Y坐标,给20分 怎样才能让我打开的网页全屏? 怎么用JAVASCRIPT得到屏幕的宽度和高度!!!!(立即给分,在线等!)
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id="Layer1" style="position:absolute; left:0px; top:0px; width:100%; height:100%; z-index:1">
<table width="60%" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
<td><img src="http://www.csdn.net/images/ad/ad-java.gif"></td>
</tr>
</table>
</div>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="http://search.microsoft.com/library/shared/toolbar/graphics/banners/MSDN_banner.gif" width="100%" height="100%"></td>
</tr>
</table>
</body>
起码:z-index应该等于-1嘛
而且,用width:100%,height:100%,肯定没用的,
窗口长宽的属性是什么(忘了)?
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
和
<div ......之间随便敲几个字母,就会看见图片被压小了一块,怎么称得上是“壁纸”哪?倒是你自己试过了没有啊?还是和我说的:
做一个层做背景(比如把layer的Zindex设置到-1)
里面就放一张图片然后在用户改变窗口大小的时候(或者简单点就开始执行的时候)
把图片大小设置成窗口大小。试试看吧(好像有个似乎也是楼主发的帖子:
http://expert.csdn.net/Expert/topic/1524/1524342.xml?temp=.8833429