到目前为止总共发现4中方式,以下列出,也有推荐使用的:
1.新建一个表格,在DW里面直接有“背景”选项,可以在电脑里选择一张图片来设置成网页背景。
2.直接写代码
<TABLE height=600 width=600 background=你的背景图片地址 border=0>
<TR>
<TD>www.siviy.com关于添加背景图片的文章。
</TD>
</TR>
</TABLE>
3.在body里面设置
<body background=要设置的网页背景图片>
4.用CSS定义body的背景
<STYLE TYPE="text/css">
<!--
BODY {background-image: URL(图片名称.gif);
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;}
-->
</STYLE>
好东西不可错过:
body{margin:0px;background: url(images/bg_index_1.jpg) repeat-x #deebf3;}
发现一个更好用的CSS控制背景图片(推荐):
<STYLE TYPE="text/css">
<!--
BODY {
background-image: URL(images/bg_index_1.jpg);
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
}
-->
</STYLE>