gpt4 book ai didi

jquery - 调整图像大小并保持新大小

转载 作者:太空宇宙 更新时间:2023-11-03 21:48:37 34 4
gpt4 key购买 nike

我有一个具有特定宽度和高度值的图像 <img id="image" width="500" height="100"/> ,并且我想将此图像的大小调整为新值,并使它们无限期地保持这种变化。

我用过.effect()像这样..

$( document ).click(function() {
$( "#image" ).effect( "size", {
to: { width: 200, height: 60 }
}, 1000 );
});

可惜好像是限时功能,图片变回原来的大小。

解决方案或有用的教程非常好,谢谢。

更新:

关于我身上发生的事情的 fiddle :http://fiddle.jshell.net/SdHGK/

最佳答案

$(document).click(function() {
$( "#toggle" ).animate({ width: '200px', height: '60px'}, 1000 );
});

关于jquery - 调整图像大小并保持新大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18945232/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com