手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

jQuery可以任意拖拽div内容

时间:2024-11-02 06:48:46

1、准备好需要用到的图标。

jQuery可以任意拖拽div内容

2、新建html文档。

jQuery可以任意拖拽div内容

3、书写hmtl代码。<div class="aaa"></div>

jQuery可以任意拖拽div内容

4、书写css代码。<style> *{margin:0;padding:0;list-st烤恤鹇灭yle:none;} .aaa{ width:200px; height:200px; position:absolute; right:100px; top:100px; background:url("images/lanren.png") no-repeat center center; } </style>

jQuery可以任意拖拽div内容

5、书写并添加js代码。 <script src="js/jquery1.7.2.js"></script> <script src="js/Tdrag.js"></script> <script> $(function(){ $(".aaa").Tdrag(); }) </script>

jQuery可以任意拖拽div内容

6、代码整体结构。

jQuery可以任意拖拽div内容

7、查看效果。

jQuery可以任意拖拽div内容
© 手抄报圈