怎样让背景拉伸填充,(不是repeat) 你用作背景啊我也不太清楚上次我是用repeat来处理的我再试试 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <div style="width=400;height:500"><img src="whatever.jpg" width="100%" height="100%" style="z-index:-1"><table style="position:relative;margin-top:-500;width:100%:height:100%"><tr><td>dddddddddddddddddddddddddddddddddddddddd</td></tr><tr><td>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</td></tr><tr><td>dddddddddddddddddddddddddddddddddddddddd</td></tr></table></div> sorry:<div style="width:400;height:500">把高宽改成你要的数字 我也知道用层可以,但是直接用table行吗?我没找到控制属性 karma(无为)地方案固然可行, 但是,正如playlynx(阿土)所言,用到了<div>, 要控制table地位置,使用margin-top之类地属性总是存在一些误差,不能完美地对齐<div>地上边(当然可以适当地增大或减小margin-top等属性地值来消除)。 各位,还有没有更好地方法(如果没有,分就归karma了)? 我是playlynx(阿土),我的id被封了我只想说一下,我觉得直接解决最好,确实层不是那么好控制,说不定有的浏览器还不支持,而且nn4吧还会在缩放有层的页面时会出现定位问题,何况还得重新写代码。所以,有人有办法解决吗? 这个程序可以拉伸窗口的背景图片,你改一下吧!<script language="JavaScript">function makeIm() {NS4=(document.layers);IE4=(document.all);scaleWidth = true;scaleHeight = true;imSRC = "file:///D/background.gif";if (NS4) {origWidth = innerWidth;origHeight = innerHeight;}function reDo() {if (innerWidth != origWidth || innerHeight != origHeight)location.reload();}if (NS4) onresize = reDo;if (IE4) onresize = reDoIE;function reDoIE(){imBG.width = document.body.clientWidth;imBG.height = document.body.clientHeight;}winWid = (NS4) ? innerWidth : document.body.clientWidth;winHgt = (NS4) ? innerHeight : document.body.clientHeight;imStr = "<div id=elBGim"+ " style='position:absolute;left:0;top:0;z-index:-1'>"+ "<img name='imBG' border='0' src="+imSRC;if (scaleWidth) imStr += " width="+winWid;if (scaleHeight) imStr += " height="+winHgt;imStr += "></div>";document.write(imStr);}makeIm();</script> viking(海盗)给地程序有问题, 看起来也是用到了div,我也懒得改了 期待比karma(无为)更好地方案!! jquery ajax 读取xml,如何修改里面的值,求大神解决。在线等啊 js 如何根据IFrame子页面中的值改变父页面某个元素的值 怎么连接远程DB2数据库 Jquery的子元素过滤选择器 的问题 奇怪的问题!在firefox下,处理xmhttp返回值的回调函数使用document.write函数无效! JS验证客户端是否安装WORD IE8不支持js问题,求高人解答~ 移动广告的问题 网页菜单如何启动本地应用程序? 如何比较两字符串是否相同? 请教有关eval的问题!! position:relative 是什么意思?
<img src="whatever.jpg" width="100%" height="100%" style="z-index:-1">
<table style="position:relative;margin-top:-500;width:100%:height:100%">
<tr>
<td>dddddddddddddddddddddddddddddddddddddddd</td>
</tr>
<tr>
<td>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</td>
</tr>
<tr>
<td>dddddddddddddddddddddddddddddddddddddddd</td>
</tr>
</table>
</div>
<div style="width:400;height:500">
把高宽改成你要的数字
我没找到控制属性
karma(无为)地方案固然可行, 但是,正如playlynx(阿土)所言,用到了<div>, 要控制table地位置,使用margin-top之类地属性总是存在一些误差,不能完美地对齐<div>地上边(当然可以适当地增大或减小margin-top等属性地值来消除)。
各位,还有没有更好地方法(如果没有,分就归karma了)?
我只想说一下,我觉得直接解决最好,确实层不是那么好控制,说不定有的浏览器还不支持,而且nn4吧还会在缩放有层的页面时会出现定位问题,何况还得重新写代码。
所以,有人有办法解决吗?
<script language="JavaScript">
function makeIm() {
NS4=(document.layers);
IE4=(document.all);
scaleWidth = true;
scaleHeight = true;
imSRC = "file:///D/background.gif";
if (NS4) {
origWidth = innerWidth;
origHeight = innerHeight;}
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();}
if (NS4) onresize = reDo;
if (IE4) onresize = reDoIE;
function reDoIE(){
imBG.width = document.body.clientWidth;
imBG.height = document.body.clientHeight;}
winWid = (NS4) ? innerWidth : document.body.clientWidth;
winHgt = (NS4) ? innerHeight : document.body.clientHeight;
imStr = "<div id=elBGim"
+ " style='position:absolute;left:0;top:0;z-index:-1'>"
+ "<img name='imBG' border='0' src="+imSRC;
if (scaleWidth) imStr += " width="+winWid;
if (scaleHeight) imStr += " height="+winHgt;
imStr += "></div>";
document.write(imStr);}
makeIm();
</script>
viking(海盗)给地程序有问题,
看起来也是用到了div,我也懒得改了
期待比karma(无为)更好地方案!!