编写一页面,设置页面背景图为bg.jpg,在页面中居中显示名为myphoto.jpg的图形文件。

来源:百度知道 编辑:UC知道 时间:2024/05/15 10:05:22
编写一页面,设置页面背景图为bg.jpg,在页面中居中显示名为myphoto.jpg的图形文件。请大家帮忙~~

就这么简单:

<body background=bg.jpg>
<img align=center src=myphoto.jpg>
</body>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>My Photo</title>
<style type="text/css">
<!--
body {
background-image: url(bg.jpg);
}
-->
</style></head>

<body>
<div align="center"><img src="myphoto.jpg"></div>
</body>
</html>