发布于 2016-02-10 10:34:17
您需要稍微修改代码,但这是可能的。请查看此小提琴以查看所编辑的示例是否正常工作。
基本上,您将图像放在div中,并将要放大的图像设置为背景图像,然后在悬停时放大背景图像。
div.horizontalboxes:hover { background-size: 200px 150%; }就这么简单。
希望你发现这个答案有帮助,如果你有更多的问题,请随时留言。
发布于 2016-02-10 10:12:36
检查一下这个fiddle..isthis你需要什么?
请考虑以下示例
<div class="wrapper">
<a href="javascript:void(0)">
<img src="http://files.braadmartin.com/gretsch-catalina-club-in-natural.jpg" width="250" height="250" />
</a>
<a href="javascript:void(0)">
<img src="http://files.braadmartin.com/gretsch-catalina-club-in-natural.jpg" width="250" height="250" />
</a>
<a href="javascript:void(0)">
<img src="http://files.braadmartin.com/gretsch-catalina-club-in-natural.jpg" width="250" height="250" />
</a>
</div>和css
.wrapper {
width: 250px;
height: 250px;
text-align: center;
}
.wrapper img {
margin: 4% 0;
height: 92%;
width: auto;
}
.wrapper img:hover {
margin: 0;
height: 100%;
}这是小提琴
发布于 2016-02-10 10:25:31
尝试使用css transform属性。
.image:hover {
webkit-transform: scale(1.2);
ms-transform: scale(1.2);
transform: scale(1.2);
}https://stackoverflow.com/questions/35312176
复制相似问题