我需要像这张图片一样制作可调整大小的句柄.
更具体地说,我需要在我周围设置那些蓝点<div>
以允许从不同侧面调整大小.
目前我正在使用以下代码:
<html>
<head>
<link rel="stylesheet" href="jquery-ui-1.10.2/themes/base/jquery-ui.css" />
<script src="jquery-1.9.1.min.js"></script>
<script src="jquery-ui-1.10.2/ui/jquery-ui.js"></script>
<title>border</title>
<script type="text/javascript">
$(function() {
$('#elementResizable').resizable({
handles: {
'ne': '#negrip',
'se': '#segrip',
'sw': '#swgrip',
'nw': '#nwgrip'
}
});
});
</script>
<style>
#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;
}
</style>
</head>
<body>
<div …
Run Code Online (Sandbox Code Playgroud)