100分求答案!关于html中的图片位置的调整问题

cccer 2004-08-16 02:17:43
用css定位图象的确很爽!!但是当IE的大小改变时,图象的位置无法根据IE的大小改变
例如:当IE有半个屏幕大小时,我用css定位图象在中心,但是一旦IE改成全屏,图象就偏左,
如何解决这个问题,完后马上散分!!

我使用css定位的方式一般如下:
<html>
<body>
<div style=position:absolute;left=94px;top:20px>
<img src=blackground.jpg height=500>
</div>
</body>
</html>
...全文
1141 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhao_sh 2004-08-16
  • 打赏
  • 举报
回复
<html>
<body>
<div style=position:absolute;left=94px;top:20px align="center">
<img src=blackground.jpg height=500>
</div>
</body>
</html>
yangjuanli 2004-08-16
  • 打赏
  • 举报
回复
<html>
<body>
<center>
<img src="henan.jpg" height=500>
</center>
</body>
</html>
Latnok Han 2004-08-16
  • 打赏
  • 举报
回复
其它别的方法可能就要写javascript
Latnok Han 2004-08-16
  • 打赏
  • 举报
回复
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><img src="blackground.jpg"></td>
</tr>
</table>
</body>
</html>
Latnok Han 2004-08-16
  • 打赏
  • 举报
回复
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
background-repeat: no-repeat;
background-position: center center;
}
-->
</style>
</head>

<body background="blackground.jpg">
</body>
</html>

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧