实例代码“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 { background-position: top left; }
12
  #resizable, #also { width: 150px; height: 120px; padding: 0.5em; }
13
  #resizable h3, #also h3 { text-align: center; margin: 0; }
14
  #also { margin-top: 1em; }
15
  </style>
16
  <script>
17
  $(function() {
18
    $( "#resizable" ).resizable({
19
      alsoResize: "#also"
20
    });
21
    $( "#also" ).resizable();
22
  });
23
  </script>
24
</head>
25
<body>
26
 
27
<div id="resizable" class="ui-widget-header">
28
  <h3 class="ui-state-active">缩放</h3>
29
</div>
30
 
31
<div id="also" class="ui-widget-content">
32
  <h3 class="ui-widget-header">同步缩放</h3>
33
</div>
34
 
35
 
36
</body>
37
</html>