Very cool JavaScript drag paging, seamless cycle paging, drag the mouse to complete pagination, drag the mouse back to the previous page, drag the right to turn the second page, but also with animation effects, really very good, interface black, Non-mainstream style, I believe many people will like.
JavaScript to implement cool drag paging
Js
?
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26-27--28 29---30 31--32 33 34 35 36 37 38-39 40 41 42 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 5, 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 11 9 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148-149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171-172 |
<html> <head> <title> Drag page </title> <meta http-equiv=content-type content= "text/html; charset=gb2312 "> <style> body{border:0px; margin:0px; overflow:hidden; background-color:transparent;}. Page {Position:absolute width:700px; border:1px solid #999; Background-color: #000; left:425px; margin-left:-350px; cursor: Default z-index:0; ul{height:320px; list-style:none margin:40px 50px 0px padding:0px; li{width:100%; height:30px; f ont-size:14px; Text-align:left; border-bottom:1px dashed #999; a{Text-decoration:none color: #999;} a:hover{font-weight:bold;} li span{float:right; color: #999; tip{DISPLAY:BL Ock; width:100%; font-size:12px; Color: #999; Text-align:center; margin:10px 0px 20px; } </style> </head> <body onselectstart= "return false;" > <script> function ID (obj) {return document.getElementById (obj);} var page; var lm,mx; var Md=false; var sh=0; var En=false; Window.onload=functIon () {page=document.getelementsbytagname ("div"); if (page.length>0) {page[0].style.zindex=2;} for (i=0;i <page.length;i++) {page[i].classname= "page"; page[i].innerhtml+= "<span class=" Tip ">" + (i+1) + "/" + page.length+ "page tip: Drag the left and right pages </span>"; Page[i].id= "page" +i; Page[i].i=i; Page[i].onmousedown=function (e) {if (!en) {if (!e) {e=e| | window.event;} Lm=this.offsetleft; mx= (E.pagex) e.pagex:e.x; This.style.cursor= "W-resize"; Md=true; if (document.all) {this.setcapture ();} else{window.captureevents (event.mousemove| Event.mouseup); }} page[i].onmousemove=function (e) {if (MD) {en=true; if (!e) {e=e| | window.event;} var ex= (E.pagex) e.pagex:e.x; this.style.left=ex-(MX-LM) +350; if (this.offsetleft<75) {var cu= (this.i==0)? page.length-1:this.i-1; page[sh].style.zindex=0; PAGE[CU]. Style.zindex=1; this.style.zindex=2; SH=CU; } if (this.offsetleft>75) {var cu= (this.i==page.length-1)? 0:this.i+1; page[sh].style.zindex=0; PAGE[CU]. Style.zindex=1; this.style.zindex=2; SH=CU; } }} page[i].onmouseup=function () {this.style.cursor= "default"; md=false; if (document.all) {this.releasecapture ();} else{window.releaseevents (event.mousemove| Event.mouseup); } flyout (this); }} function flyout (obj) {if (obj.offsetleft<75) {if (Obj.offsetleft + 350-20) > -275) {obj.style.left=o Bj.offsetleft + 350-20; Window.settimeout ("Flyout (ID ('" +obj.id+ "));", 0; }else{obj.style.left=-275; obj.style.zindex=0 flyin (ID (obj.id));} if (obj.offsetleft>75) {if (Obj.offsetleft + +) < 1125) {obj.style.left=obj.offsetleft + +; window.se Ttimeout ("Flyout (ID ('" +obj.id+ "));", 0; }else{obj.style.left=1125; obj.style.zindex=0 flyin (ID (obj.id));} } function Flyin (obj) {if (obj.offsetleft<75) {if (Obj.offsetleft + +) < 425) {Obj.style.left=obj.offsetleft + 350 + 20; Window.settimeout ("Flyin (ID ('" +obj.id+ "));", 0; }else{obj.style.left=425; en=false;} if (obj.offsetleft>75) {if (Obj.offsetleft + 350-20) > 425) {obj.style.left=obj.offsetleft + 350-20; Window.settimeout ("Flyin (ID ('" +obj.id+ "));", 0; }else{obj.style.left=425; en=false;} } </script> |
Html:
?
| 1, 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
<div> <ul> <li><span>2009-4-29 02:16</span><a href=#> Oriental Pearl </a></li> <li><span>2009-4-29 02:16</span><a href=#>! Lover </a></li> <li><span>2009-4-29 02:16</span><a href=#> Serenity Spa </a></li > <li><span>2009-4-29 02:16</span><a href=#> you look </a></li> <li>< span>2009-4-29 02:16</span><a href=#> Love song 1980</a></li> <li><span>2009-4-29 02:16</span><a href=#> 1980</a></li> <li><span>2009-4-29 02:16</span> <a href=#> 2000</a></li> <li><span>2009-4-29 02:16</span><a href=#> Asia's Orphans </a></li> <li><span>2009-4-29 02:16</span><a href=#> Childhood </a></li > </ul> </div> <div> <ul> <li><span>2009-4-29 02:16</span><a href=# > Play Lyrics </a></li>; li><span>2009-4-29 02:16</span><a href=#> Rook </a></li> <li><span> 2009-4-29 02:16</span><a href=#> Oriental Pearl </a></li> <li><span>2009-4-29 02:16</ Span><a href=#> rolling dust </a></li> <li><span>2009-4-29 02:16</span><a href=# > Time Story </a></li> <li><span>2009-4-29 02:16</span><a href=#> archaisms </a> </li> <li><span>2009-4-29 02:16</span><a href=#> Phenomenon 72 change </a></li> <li ><span>2009-4-29 02:16</span><a href=#> nostalgic four rhyme </a></li> <li><span> 2009-4-29 02:16</span><a href=#> through your dark hair my hand </a></li> </ul> </div> <div> < Ul> <li><span>2009-4-29 02:16</span><a href=#>, private song </a></li> <li>< span>2009-4-29 02:16</span><a href=#> Yellow face </a></li> <li><span>2009-4-29 02:16</span><a href=#> Taipei Red Rose </a></li> </ul> </div> </body> </html> |
The above is the entire contents of this article, I hope you can enjoy.