dreamweaver这段代码怎么不能添加背景呢

来源:百度知道 编辑:UC知道 时间:2024/06/30 21:51:55
我想实现添加背景的,背景可以根据分辨率满屏显示,于是用了100%的宽度和高度,但是显示出来的只有一行,我不知道怎么改
<body>
<table width="100%" height="100%" border="0">
<tr>
<td background="login.jpg"></td>
</tr>
</table>
</body>

<table width="100%" height="100%" border="0">
<tr>
<td style="width:600px;height:300px;background:url(sl1.jpg) no-repeat;"></td>
</tr>
</table>

<!--width表示背景的宽度;height表示背景高度,参数no-repeat是背景不重复,如果要横向重复修改为repeat-x 如果纵向重复repeat-y 横向纵向都重复repeat 就行了-->

<body background="login.jpg>
<table width="100%" height="100%" border="0">
<tr>
<td background="login.jpg"></td>
</tr>
</table>
</body>

ls在table里套css也可以
不过最好还是单独提出来不要用table而改用div啦