图像不在浏览器窗口中移动

时间:2013-06-13 22:25:18

标签: html position z-index

我有一张图片,我希望将其放置在HTML页面的右边缘附近,并将鼠标悬停在页面上的所有其他位置。当窗口调整大小时,我还希望图像保持在右边缘附近。截至目前,图像保持在浏览器窗口内的固定位置,甚至在浏览器窗口扩展时出现在页面内容区域之外。我的页面内容以浏览器窗口为中心。以下是图片上的代码:

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top">
<table width="900" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td background="../images/FWA_INV_head.jpg" valign="top" align="center">
<img src="images/bannerX.png" border="0" class="image" style="position:absolute;z-index:90;>

这是CSS:

.image {    
position:absolute;
opacity:.90;
-moz-opacity:.90;
filter:alpha(opacity=90);
}

请帮我看看我的方式错误。

1 个答案:

答案 0 :(得分:0)

定位绝对元素时,绝对位置位于最近的相对位置内。所以它绝对位于相对位置。你的内联风格也没有关闭“