We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
由于这个问题现在已经被看到超过 1k 次,所以我将我的解决方案添加到其中。 随意复制和改编。
该解决方案涉及 jQuery UI 滑块插件。 主要是我们创建一个固定大小的div,overflow:scroll,包含一个img标签,并在其下面添加一个滑块。 滑块“更改”事件绑定到 img@width/@height 属性的重新缩放。
以下是我们所做的摘录:
HTML
JS
As this question has now been seen more than 1k times, I add my solution to it. Feel free to copy and adapt.
The solution involves jQuery UI slider plugin. Mainly we create a div with fixed size, overflow:scroll, containing a img tag, and we add a slider under it. The slider 'change' event is bound to a rescale of the img@width/@height attributes.
Here is an excerpt of what we did :
HTML
JS
不知道这是否值得你付出努力,但是有一些很棒的库可以在 Cappuccino 中做到这一点。 本教程演练向您展示如何构建缩放和旋转图像的应用程序:
剪贴簿教程< /a>
Don't know if it's worth the effort for you, but there's some terrific libraries that do exactly this in Cappuccino. The tutorial walkthrough shows you how to build an app that zooms and rotates images:
Scrapbook tutorial