答案 0 :(得分:0)
The implementation Demo on JSFiddle is here
使用Javascript:
$(function() {
var bottomElem = $(".resizable-bottom");
var bottomElemOriginalHeight = bottomElem.height();
$(".resizable-top").resizable({
handles: 's',
resize: function(event, ui) {
bottomElem.height(bottomElemOriginalHeight - (ui.element.outerHeight() - ui.originalSize.height));
},
stop: function(event, ui) {
bottomElemOriginalHeight = bottomElem.height();
},
//This has the effect of minHeight for bottomElem
maxHeight: $(".resizable-top").height()
});
});