可resize的div不会保留在包含参数内
调整中间div的大小时,它不会保留在网格右边界的containment
参数内,并且不会调整到左侧。
http://jsfiddle.net/dKuER/8/ (明确示例,更新)
HTML
JS
$(document).ready(function() { $('.resizable').resizable({ containment: "#grid", // Updated to reflect answer, but wasn't the issue. handles: "ne,se,nw,sw" }); });
尝试:
containment: "#grid",
不是禁闭。
看起来resize不是在为大纲类设置的边距中计算的。 如果删除它们,则resize仍会包含在#grid元素中。 我不确定你希望如何处理其他一切,但我建议绝对定位可resize的元素和$ grid容器的相对位置。