<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 8 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 8 年前。
这是我的 link . 当我点击图标时,它会变得比其他图标更大,以提示您在哪个页面上。 我需要它来平滑地转换比例(图标平滑地变大)。
最佳答案
我已经使用 css 中使用的简单技术完成了此操作,将图标的宽度保留在相应页面上并仅添加 id。
<td id="zoom"><a href="visualization.html"><img src="image/bubble_plus3.png" width="150" /></a></td>
还有CSS:
#zoom img {
/*transform:scale 1s;
animation: scale 1s;*/
-moz-animation: scale 0.5s; /* Firefox */
-webkit-animation: scale 0.5s; /* Safari and Chrome */
-o-animation: scale 0.5s; /* Opera */
margin-top:-20px;}
@keyframes scale {
from {
width:107px;
}
to {
width:150px;
}}
@-moz-keyframes scale { /* Firefox */
from {
width:107px;
}
to {
width:150px;
}}
@-webkit-keyframes scale { /* Safari and Chrome */
from {
width:107px;
}
to {
width:150px;
}}
@-o-keyframes scale { /* Opera */
from {
width:107px;
}
to {
width:150px;
}}
关于css - 在加载页面 CSS 图像变换时平滑缩放(在页面加载时更改图像大小),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18432312/