js實作iGoogleDivDrag模組拖曳層拖曳特效的方法_javascript技巧
May 16, 2016 pm 04:11 PM
js
方法
模組
本文實例講述了js實作iGoogleDivDrag模組拖曳層拖曳特效的方法。分享給大家供大家參考。具體實作方法如下:
複製程式碼 程式碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>js实现iGoogle Div Drag 模块拖动 层拖动效果</title>
<style type="text/css">
*{margin:0px; padding:0px;}
body{position:relative; width:780px; height:800px; border:1px solid red}
.drag{width:200px; height:100px; border:1px solid #000;margin:20px; background:#fff}
.drag h1{margin:0px; padding:0px; font-size:12px; height:18px; line-height:18px; background:#E0E7F3; text-indent:20px;cursor:move;}
.center{ margin:200px; border:3px solid red}
</style>
<script type="text/javascript"></script>
</head>
<body>
<div class="drag" >
<h1><strong>www.baidu.com</strong></h1>
</div>
<div class="drag" >
<h1>www.163.com</h1>
</div>
<div class="drag" >
<h1><strong>www.jb51.net</strong></h1>
</div>
<div class="drag"><h1>测试二</h1></div>
<div class="drag"><h1>测试三</h1></div>
<div class="drag"><h1>测试四</h1></div>
<div class="drag"><h1>测试五</h1></div>
身體>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>js实现iGoogle Div Drag 模块拖动 层拖动效果</title>
<style type="text/css">
*{margin:0px; padding:0px;}
body{position:relative; width:780px; height:800px; border:1px solid red}
.drag{width:200px; height:100px; border:1px solid #000;margin:20px; background:#fff}
.drag h1{margin:0px; padding:0px; font-size:12px; height:18px; line-height:18px; background:#E0E7F3; text-indent:20px;cursor:move;}
.center{ margin:200px; border:3px solid red}
</style>
<script type="text/javascript"></script>
</head>
<body>
<div class="drag" >
<h1><strong>www.baidu.com</strong></h1>
</div>
<div class="drag" >
<h1>www.163.com</h1>
</div>
<div class="drag" >
<h1><strong>www.jb51.net</strong></h1>
</div>
<div class="drag"><h1>测试二</h1></div>
<div class="drag"><h1>测试三</h1></div>
<div class="drag"><h1>测试四</h1></div>
<div class="drag"><h1>测试五</h1></div>
身體>
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱門文章
R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
1 週前
By 尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
3 週前
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前
By 尊渡假赌尊渡假赌尊渡假赌
擊敗分裂小說需要多長時間?
3 週前
By DDD
公眾號網頁更新緩存難題:如何避免版本更新後舊緩存影響用戶體驗?
3 週前
By 王林

熱門文章
R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
1 週前
By 尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
3 週前
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前
By 尊渡假赌尊渡假赌尊渡假赌
擊敗分裂小說需要多長時間?
3 週前
By DDD
公眾號網頁更新緩存難題:如何避免版本更新後舊緩存影響用戶體驗?
3 週前
By 王林

熱門文章標籤

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)