js实现模态框的拖曳功能

项目中需要对模态框进行拖曳,以便对比模态框和页面中的元素,现demo如下:

  1 
  2 
  3             
  4         
  5         
  6         
  7         
 19     
 20     class="">
 21         
class="container-fluid"> 22 23 26 27 28 29
class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> 30
class="modal-dialog" style="top: 0px; left: 0px;"> 31
class="modal-content"> 32
class="modal-header"> 33 34

class="modal-title" id="myModalLabel">Modal title

35
36
class="modal-body"> 37 this is the modal-body areas 38
39
class="modal-footer"> 40 41 42
43
44
45
46
47 48 49 117

 

转载于:https://www.cnblogs.com/wenzhonghua/p/6610831.html

你可能感兴趣的:(js实现模态框的拖曳功能)