[英]imgAreaSelect JQuery Plugin Resizable Div's Minimum's Width and Height
I have a re sizable div generated by a Jquery Plug-in.It's purpose is for the cropping functionality. 我有一个由Jquery插件生成的可调整大小的div,其目的是用于裁剪功能。 Below is the Jquery plug-in's link:
以下是Jquery插件的链接:
http://odyniec.net/projects/imgareaselect/usage.html http://odyniec.net/projects/imgareaselect/usage.html
HTML Code: HTML代码:
<div class="imgareaselect-border4"></div>
JavaScript Code: JavaScript代码:
$('#img_captured').imgAreaSelect({
handles: true,
aspectRatio: "1:1",
disable: false,
hide: false,
show:true,
minHeight: '140px', //Set it's minimum height
minWidth: '140px' //Set it's minimum width
});
It has a way of setting it's minimum height and width, but doesn't work with me. 它可以设置最小高度和最小宽度,但不适用于我。 I don't know what's wrong, so my last resort is to do it manually.
我不知道出了什么问题,所以我的最后一招是手动进行操作。 I tried using the css code below but doesn't work.
我尝试使用下面的CSS代码,但不起作用。 How can I limit it until it's dimension is 140px x 140px?
如何限制尺寸,直到尺寸为140px x 140px?
.imgareaselect-border4
{
min-height: 140px;
min-width: 140px;
}
The arguments for maxHeight and maxWidth in imgareaselect don't use strings but integers imgareaselect中maxHeight和maxWidth的参数不使用字符串,而是使用整数
$('#img_captured').imgAreaSelect({ handles: true, aspectRatio: "1:1", disable: false, hide: false, show:true, minHeight: 140, //Edit here minWidth: 140 //Edit here });
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.