jQuery-UI Draggable()控件的使用

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>jQuery UI Draggable  -default capability</title>
	<meta charset="utf-8" />
    <link href="CSS/jquery-ui.min.css" rel="stylesheet" />
    <script src="Scripts/jquery-1.10.2.min.js"></script>
    <script src="CSS/jquery-ui.min.js"></script>
    
   
    <style>
        /*加个边框*/
        #draggable {width:150px;height:150px;padding:1em; border:1px solid black;}     
    </style>
    <script>
        //脚本jquery
        $(function () {
            $("#draggable").draggable();
        });
    </script>
   
</head>
<body>
    <!--内容-->
   <div  id="draggable" class="ui-widget-content">
      <p>kdjsl</p>
   </div>
</body>

</html>

猜你喜欢

转载自blog.csdn.net/softuse/article/details/80942282