通过滑动改变div元素的高度

时间:2014-07-18 08:32:47

标签: jquery

我想通过单击元素的下边缘并使用鼠标光标将其滑动到新大小来更改div元素的高度。我想使用JQuery。

编辑:使用JQuery UI resizable()。

2 个答案:

答案 0 :(得分:0)

听起来你可能想要查看jQuery UI Resizable:

http://jqueryui.com/resizable/

答案 1 :(得分:0)

您可以使用此链接中的jquery UI

[<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Resizable - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<style>
#resizable { width: 150px; height: 150px; padding: 0.5em; }
#resizable h3 { text-align: center; margin: 0; }
</style>
<script>
$(function() {
$( "#resizable" ).resizable();
});
</script>
</head>
<body>
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Resizable</h3>
</div>
</body>
</html>][2]
相关问题