【发布时间】:2014-07-31 17:51:06
【问题描述】:
基本上我正在寻找的是能够使图像旋转 360 度并放大图像,我已经把这两个下来了。
我现在需要做的是,弄清楚如何让它真正旋转 360 度并放大到不同的图像,这是我拥有的 css:
.rotate img {
-moz-transition: all 0.6s ease-in-out;
-webkit-transition: all 0.6s ease-in-out;
-o-transition: all 0.6s ease-in-out;
-ms-transition: all 0.6s ease-in-out;
transition: all 0.6s ease-in-out;
}
.rotate img:hover {
cursor: crosshair
-moz-transform: rotate(360deg) scale(1.25);
-webkit-transform: rotate(360deg) scale(1.25);
-o-transform: rotate(360deg) scale(1.25);
-ms-transform: rotate(360deg) scale(1.25);
transform: rotate(360deg) scale(1.25);
}
这段代码运行良好,我只需要知道如何让它变成不同的图像。
【问题讨论】:
-
无法使用 CSS,但可以通过交换图像源使用 Javascript 来完成。