实现div控件拖拽调整位置和大小

doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery UI Resizable - Default functionalitytitle>
  <link rel="stylesheet" href="jquery-ui.css">
  
  <style>
  #dd {
       width: 150px; height: 150px; padding: 0.5em; }
  #dd h3 {
       text-align: center; margin: 0; }
  style>

  <style>
  #dd {
       width: 150px; height: 150px; padding: 0.5em; }
  style>
  <script src="https://code.jquery.com/jquery-1.12.4.js">script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js">script>
  <script>
  $( function() {
  
    $( "#dd" ).draggable();
    $( "#dd" ).resizable();
  } );
  script>
head>
<body>
 
<div id="dd" class="ui-widget-content">
 <table border=1>
  <tr>

    <td>aaatd><td>aaatd>
    
  tr>
  <tr>

    <td>aaatd><td>aaatd>
    
  tr>
  <tr>

    <td>aaatd><td>aaatd>
    
  tr>
  <tr>

    <td>aaatd><td>aaatd>
    
  tr>
  <tr>

    <td>aaatd><td>aaatd>
    
  tr>
  <tr>

    <td>aaatd><td>aaatd>
    
  tr>
  <tr>

    <td>aaatd><td>aaatd>
    
  tr>
  <tr>

    <td>aaatd><td>aaatd>
    
  tr>


 table>
div>
 
 
body>
html>

实现div控件拖拽调整位置和大小_第1张图片

 

转载于:https://www.cnblogs.com/lilei2blog/p/8690259.html

你可能感兴趣的:(javascript,前端,java)