jQuery UI可调整大小的插件–缩放< div>和里面的内容? [英] jQuery UI Resizable Plugin – Scaling a <div> AND the contents within?

查看:172
本文介绍了jQuery UI可调整大小的插件–缩放< div>和里面的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果可以调整<div>的大小和内容(在此为图片),有人有线索吗?
而不使用"alsoResize与类/id名称结合使用".

Does anybody have a clue, if it's possible to resize a <div> and the content (here: images)
within without using "alsoResize in combination with a class/id name".

换句话说:是否有以下解决方法:

In other words: Is there a workaround for:

 $('DIV').resizable({ handles: 'se', alsoResize: 'ITS CHILDREN' }); 

还是alsoResize只允许使用类/id名称?

or are just class/id names allowed for alsoResize?

推荐答案

您可以尝试:

$('DIV').resizable({ handles: 'se', alsoResize: 'img' });

或设置图像的宽度和宽度;高度到%值.

or set your images Width & Height to % values.

顺便说一句,alsoResize允许使用class/id names.

By the way, class/id names are allowed for alsoResize.

这篇关于jQuery UI可调整大小的插件–缩放&lt; div&gt;和里面的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆