实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
AخA
 
1
<!doctype html>
2
<html lang="en">
3
<head>
4
  <meta charset="utf-8">
5
  <title>jQuery UI 缩放(Resizable) - 对齐到网格</title>
6
  <link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
7
  <script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
8
  <script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
9
  <link rel="stylesheet" href="jqueryui/style.css">
10
  <style>
11
  #resizable { width: 150px; height: 150px; padding: 0.5em; }
12
  #resizable h3 { text-align: center; margin: 0; }
13
  </style>
14
  <script>
15
  $(function() {
16
    $( "#resizable" ).resizable({
17
      grid: 50
18
    });
19
  });
20
  </script>
21
</head>
22
<body>
23
 
24
<div id="resizable" class="ui-widget-content">
25
  <h3 class="ui-widget-header">网格</h3>
26
</div>
27
 
28
 
29
</body>
30
</html>