Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 图像在浏览器窗口中不移动_Html_Position_Z Index - Fatal编程技术网

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

Html 图像在浏览器窗口中不移动,html,position,z-index,Html,Position,Z Index,我有一个图像,我想在我的HTML页面的右边距附近的位置,并在页面上的所有其他悬停。我还希望在调整窗口大小时,图像保持在右边距附近。到目前为止,图像将保留在浏览器窗口内的固定位置,甚至在浏览器窗口扩展到较大范围时出现在页面内容区域之外。我的页面内容在浏览器窗口中居中。下面是图像上的代码: <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" val

我有一个图像,我想在我的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;>

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

定位绝对元素时,您的绝对位置位于最近的相对位置内。所以它绝对位于相对位置内。此外,内联样式没有结束“

”当定位绝对元素时,您的绝对位置位于最近的相对位置内。“实际上,它是相对于最近的祖先定位的。不仅仅是相对定位的。哦,我不确定我是否知道。每当我定位某个绝对值时,我通常会确保它位于相对定位的容器中,这样无论DOM树如何更改(假设它的父容器始终存在),它都不会得到扭曲的结果。
.image {    
position:absolute;
opacity:.90;
-moz-opacity:.90;
filter:alpha(opacity=90);
}