案例:jQuery UI案例     状态:可编辑再运行    进入竖版
 运行结果 
AخA
  <img src="/img/up/2017-1-5/20-46-336022.jpg" width="384" height="288" alt="earth">
 
1
<!doctype html>
2
<html lang="en">
3
<head>
4
  <meta charset="utf-8">
5
  <title>jQuery UI 定位(Position) - 图像循环</title>
6
  <link rel="stylesheet" href="/css/jqu1.10.4/jquery-ui.min.css">
7
  <script src="/js/jqu/jquery.min1.10.2.js"></script>
8
  <script src="/js/jqu/jquery-ui.min1.10.4.js"></script>
9
  <link rel="stylesheet" href="jqueryui/style.css">
10
  <style>
11
  body {
12
    margin: 0;
13
  }
14
  #container {
15
    overflow: hidden;
16
    position: relative;
17
    height: 400px;
18
  }
19
 
20
  img {
21
    position: absolute;
22
  }
23
  </style>
24
  <script>
25
  $(function() {
26
    // 重构部件,去除这些插件方法
27
    $.fn.left = function( using ) {
28
      return this.position({
29
        my: "right middle",
30
        at: "left+25 middle",
31
        of: "#container",
32
        collision: "none",
33
        using: using
34
      });
35
    };
36
    $.fn.right = function( using ) {
37
      return this.position({
38
        my: "left middle",
39
        at: "right-25 middle",
40
        of: "#container",
41
        collision: "none",
42
        using: using
43
      });
44
    };
45
    $.fn.center = function( using ) {
46
      return this.position({
47
        my: "center middle",
48
        at: "center middle",