Html 悬停时的缩放位置

Html 悬停时的缩放位置,html,css,hover,zooming,Html,Css,Hover,Zooming,当我点击图像时,我想改变悬停图像的位置。现在*图片悬停在底部放大,我想在顶部放大后看到图片链接。 我添加了以下代码: HTML: 图片: 试试这个 .image:hover { cursor: pointer; height:400px; width: 400px; transform:scale(1.5); -ms-transform:scale(1.5); /* IE 9 */ -moz-transform:scale(1.5); /* Firefox */ -webkit-transfo

当我点击图像时,我想改变悬停图像的位置。现在*图片悬停在底部放大,我想在顶部放大后看到图片链接。 我添加了以下代码:

HTML:

图片:

试试这个

 .image:hover {
cursor: pointer;
height:400px;
width: 400px;
transform:scale(1.5);
-ms-transform:scale(1.5); /* IE 9 */
-moz-transform:scale(1.5); /* Firefox */
-webkit-transform:scale(1.5); /* Safari and Chrome */
-o-transform:scale(1.5); /* Opera */
}

它可以工作。

我已经解决了这个问题:.image:hover{background:url;height:500px;width:400px;margin top:-250px;color:trasparent;}好的,但是如果您使用不同的图像,您不需要再次调用该图像,您可以使用它,否则不需要:
.image { background:url(image url); height:50px; width:50px; }

.image:hover { background:url( image url ); height:400px; width:400px; }
 .image:hover {
cursor: pointer;
height:400px;
width: 400px;
transform:scale(1.5);
-ms-transform:scale(1.5); /* IE 9 */
-moz-transform:scale(1.5); /* Firefox */
-webkit-transform:scale(1.5); /* Safari and Chrome */
-o-transform:scale(1.5); /* Opera */
}