
上QQ阅读APP看书,第一时间看更新
3.4 缩放(Resizable)
缩放组件可以使用户动态地调整元素的大小,缩放的使用非常简单,下面将简要介绍。
缩放的默认配置定义在$.fn.resizable.defaults中。
1. 创建缩放
使用标记创建缩放的方法如下:
01 <div class=”easyui-resizable” style=”width:100px;height:100px;border:1px solid #ccc;” 02 data-options=”maxWidth:800,maxHeight:600”> 03 </div>
通过JavaScript创建缩放的方法如下:
01 <div id=”rr” style=”width:100px;height:100px;border:1px solid #ccc;”></div> 02 $(‘#rr’).resizable({ 03 maxWidth:800, 04 maxHeight:600 05 });
2. 缩放属性
缩放组件常用属性说明见表3.8。
表3.8 缩放常用属性说明

3. 缩放事件
缩放组件常用事件说明见表3.9。
表3.9 缩放常用事件说明

4. 缩放方法
缩放组件常用方法说明见表3.10。
表3.10 缩放常用方法说明
