使用HTML编辑网页时,怎么样把图片设为背景的方法和代码??

来源:百度知道 编辑:UC知道 时间:2024/05/15 07:48:08
跪求个位大大~谁知道就告诉下

简单点的吧`
在<body>中加入 background="图片路径"
如<body background="hello.jpg">
、 最好是把图片做成和网页一样大小
` 如果想设置图片大小
可以在 background="" 后加上 width="宽度"
height="高度"
█ 希望你能用的上``

<html>
<head>
<style>
.er {
background-image:url(images/133.jpg);/*背景图片*/
background-repeat: repeat-x;/*背景图片横向平铺*/
height: 50px;/*div的高*/
width: 300px;/*div的宽*/
}
</style>
</head>
<body>
<div class="er">图片背景平铺</div>
<table width="300" height="50" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/133.jpg">图片背景平铺</td>
</tr>
</table>
<table class="er" border="0" cellspacing="0" cellpadd