jquery – 调整角落中带有手柄的元素大小

Jcrop,选择裁剪区域后,出现一个div,带有拐角处的手柄.

有没有可以建立这种类型的框柄的jQuery插件?

解决方法

您可以使用如上所述的jQuery UI可调整大小.我甚至为你设置了一个小提琴!

http://jsfiddle.net/digitalaxis/j2JU6/

jQuery的

$('#element').resizable({
    handles: {
    'ne': '#negrip','se': '#segrip','sw': '#swgrip','nw': '#nwgrip'
    }
});

HTML

<div class="ui-resizable-handle ui-resizable-nw" id="nwgrip"></div>
<div class="ui-resizable-handle ui-resizable-ne" id="negrip"></div>
<div class="ui-resizable-handle ui-resizable-sw" id="swgrip"></div>
<div class="ui-resizable-handle ui-resizable-se" id="segrip"></div>

CSS

#elementResizable {
    border: 1px solid #000000;
    width: 300px;
    height: 40px;
    overflow: hidden;
}
#nwgrip,#negrip,#swgrip,#segrip,#ngrip,#egrip,#sgrip,#wgrip {
    width: 10px;
    height: 10px;
    background-color: #ffffff;
    border: 1px solid #000000;
}
#segrip {
    right: -5px;
    bottom: -5px;
}

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...