2012-08-13 231 views
0

我想要一個類似於以下圖像的可實現對象的句柄。Jquery自定義調整大小手柄不起作用

我試過的代碼沒有與自定義句柄一起工作。

如果我包含自定義句柄選項,重新調整大小根本不起作用。

<style> 
    .object{ 
     width: 100px; height: 100px; border: 1px solid black; 

} 
#myContainer{ 
    height: 600px; 
    border: 2px solid #ccc; 
} 
.handle{ 
    height: 10px; width: 10px; background: red; 
} 
</style> 
<script type="text/javascript"> 
$(function() { 
    $("#resizable").resizable({ 
     handles: { 'all': $('#handle') } 
     }); 
}); 
</script> 

<div id="myContainer"> 
    <div class="object" id="resizable"> 
     <div id="handle" class="handle"></div> 
    </div> 
</div> 

enter image description here

回答

1

你見過http://jqueryui.com/demos/resizable/

您可以添加一些代碼來將div的邊框更改爲虛線邊框,並使用八個方塊的背景圖像?

+0

我知道這個插件。其實我正在尋找我所解釋的 – 2012-08-13 02:28:53

相關問題