图像放大悬停与链接

时间:2014-07-22 07:35:35

标签: css image image-zoom

I have this image zoom effect。如何将<a href="">Open image page</a>链接悬停在图像中间?

1 个答案:

答案 0 :(得分:2)

JSFIDDLE

您只需将text-align:center添加到<a>类的container_image标记

此外,在<a>标记中进行了一些样式更改,如下所示:

.container_image a {
    margin-top: 5px;
    display: block;
    -webkit-transition: all 0.5s  ease-out; -moz-transition: all 0.5s ease-out; -o-transition: all 0.5s ease-out; transition: all 0.5s ease-out;
    text-align:center;
    visibility:hidden;
    opacity:0;
}
.container_image:hover a {
    visibility:visible;
    opacity:1;
}