Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.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/7/css/39.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/kotlin/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 CSS不起作用?_Html_Css - Fatal编程技术网

Html CSS不起作用?

Html CSS不起作用?,html,css,Html,Css,我不确定为什么我的CSS不在这里工作 我错过了什么 编辑以下是主图像和较小图像的CSS: #luz{z-index:1;} #cadel{position:absolute; left:0px; top:490px; z-index:2;} #cadel:hover {background: url("../messages/files/tourdefrance/cadel-large.jpg") no-repeat 0px 286px; position:absolut

我不确定为什么我的CSS不在这里工作

我错过了什么

编辑以下是主图像和较小图像的CSS:

    #luz{z-index:1;}
    #cadel{position:absolute; left:0px; top:490px; z-index:2;}
    #cadel:hover {background: url("../messages/files/tourdefrance/cadel-large.jpg") no-repeat 0px 286px; position:absolute; z-index:3;}
    #two{position:absolute; left: 645px; top:374px; z-index:2;}
    #two:hover {background: url("../messages/files/tourdefrance/2-large.jpg") no-repeat 405px 34px; position:absolute; z-index:3;}
以下是HTML:

<div id="luz"> 
    <img src="/messages/Files/tourdefrance/LuzArdiden.jpg" width="920" height="690" alt="Luz Ardiden" /> <img id="cadel" src="/messages/Files/tourdefrance/cadel.png" width="229" height="200" alt="Cadel Evans" /> 
    <img id="two" src="/messages/Files/tourdefrance/2.jpg" width="110" height="78" alt="Alberto Contador looking at Lance Armstrong" />
</div>

小图像应位于主图像上方。他们不是,我不确定为什么

此外,当小图像悬停时,它们应该显示更大的视图

建议


编辑2问题的一部分是dreamweaver将代码粘贴到错误的位置,因此FF不会显示它。但是我的悬停不起作用?想法?

您是否正在尝试为图像标签设置背景图像

那不行。但这只是你问题的第二部分

尝试添加
位置:相对
#luz


编辑:我看不到你提到的任何css应用到你的页面上

简单的解决方案将每个图像放在一个div中,并给出它的绝对位置。。 例子:


之后你可以随心所欲地使用它。

非常确定你的CSS工作正常,否则我就看不到背景图像、导航栏、布局。。。尝试清除缓存并重新加载。代码转储。这应该被标记吗?大多数CSS都是,我指的是页面主图像下方的图像和图片。主图像下方的两个图像应位于另一个图像的上方image@share你的代码,我们可以检查问题???我想说你的标记中有一个严重的缺陷,在那里的某个地方。试过了,不起作用。我发现问题的一部分-Dreamweaver在搞乱代码,我得到了修复。但是翻转不起作用。请确保它不起作用,因为您正在尝试将背景图像设置为图像。但是图像标记用指定的图像填充所有前景空间,因此您无法看到背景图像。您可以通过css更改宽度和高度,或者如果您不想加载大图像只是为了显示小版本,您必须通过javascripThanks更改src属性,我将使用JS来完成我需要做的事情。为什么不直接定位图像?在任何情况下,它必须工作我打赌他的css位置是错误的是的,它在他的页面上不可用我修复了,DW把它放在了错误的地方,我没有抓住它。