jquery drag image

前端 未结 5 428
感动是毒
感动是毒 2021-01-11 19:17

i want to make a draggable image in jquery. first of all my experience with jquery is 0. having said that let me describe what i want to achieve. i have fixed width/height

5条回答
  •  轮回少年
    2021-01-11 20:12

    You can use the following;

    $(function() {
      $("#draggable").draggable();
    });
    .container {
      margin-top: 50px;
      cursor: move;
    }
    
    #screen {
      overflow: hidden;
      width: 200px;
      height: 200px;
      clear: both;
      border: 1px solid black;
    }
    
    
    
    

提交回复
热议问题