滑动切换图片效果【左右】
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 43 44 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 84 85 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 119 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 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | <! 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=gb2312" /> < style type="text/css" media="all"> body{ margin:0px; padding:0px; font-size:12px; font-family:"宋体", Arial, Helvetica, sans-serif; } img{ border:0px; } a{ cursor:pointer; } .clear{ clear:both; } .content_bottom_left_inner_right_hdzq_bg{ margin:0px auto; margin-top:2px; margin-bottom:6px; width:435px; height:auto; overflow:hidden; } .content_bottom_left_inner_right_hdzq_title{ background-image:url(/works/the9/GE_V5/images/main_11.jpg); width:435px; height:48px; overflow:hidden; text-align:right; } .content_bottom_left_inner_right_wjyz_title{ background-image:url(/works/the9/GE_V5/images/main_39.jpg); width:422px; height:41px; overflow:hidden; text-align:right; padding:11px 13px 0px 0px; } .content_bottom_left_inner_right_wjyz_title a{ background-repeat:no-repeat; width:60px; height:18px; overflow:hidden; display:inline-block; color:#FFFFFF; text-align:left; padding:3px 0px 0px 12px; text-decoration:none; } .a_l{ background-image:url(/works/the9/GE_V5/images/dot_bg.jpg); background-position:left -40px; } .a_r{ background-image:url(/works/the9/GE_V5/images/dot_bg.jpg); background-position:left -64px; } .content_bottom_left_inner_right_wjyz_content{ padding:0px 0px 0px 22px; height:267px; overflow:hidden; } .content_bottom_left_inner_right_wjyz_content_tabs{ background-image:url(/works/the9/GE_V5/images/main_46.jpg); background-position:center bottom; background-repeat:no-repeat; width:384px; height:auto; overflow:hidden; padding:0px 0px 1px 0px; } .content_bottom_left_inner_right_wjyz_content_tabs a:link,.content_bottom_left_inner_right_wjyz_content_tabs a:visited{ color:#FFFFFF; text-decoration:none; } .content_bottom_left_inner_right_wjyz_content_tabs a:hover{ color:#F7E06E; text-decoration:none; } .content_bottom_left_inner_right_wjyz_content_list{ padding:9px 0px 0px 0px; height:auto; overflow:hidden; } .content_bottom_left_inner_right_wjyz_content_list a:link,.content_bottom_left_inner_right_wjyz_content_list a:visited{ color:#4D4642; text-decoration:none; } .content_bottom_left_inner_right_wjyz_content_list a:hover{ color:#A71D32; text-decoration:underline; } .content_bottom_left_inner_right_wjyz_content_list_banner{ padding:0px 0px 0px 5px; width:164px; height:auto; overflow:hidden; float:left; } .content_bottom_left_inner_right_wjyz_content_list_banner img{ margin-top:12px; } .content_bottom_left_inner_right_wjyz_content_list ul{ width:220px; margin:0px; padding:0px; height:auto; overflow:hidden; list-style:none; color:#4D4642; float:left; } .content_bottom_left_inner_right_wjyz_content_list li{ background-image:url(/works/the9/GE_V5/images/dot3.jpg); background-position:left 8px; background-repeat:no-repeat; padding:6px 0px 0px 20px; } .w_t_c{ background-image:url(/works/the9/GE_V5/images/main_44.jpg); background-position:left top; width:58px; height:17px; display:inline-block; overflow:hidden; margin-right:3px; padding:4px 0px 0px 15px; color:#FFFFFF; } .w_t_a{ background-image:url(/works/the9/GE_V5/images/main_44.jpg); background-position:right top; width:58px; height:17px; display:inline-block; overflow:hidden; margin-right:3px; padding:4px 0px 0px 15px; color:#FFFFFF; } .content_bottom_left_inner_right_hdzq_bottom{ margin-top:6px; background-image:url(/works/the9/GE_V5/images/main_35.jpg); background-position:right top; background-repeat:no-repeat; width:435px; height:6px; overflow:hidden; } .content_bottom_left_inner_right_hdzq_bottom2{ margin-top:15px; background-image:url(/works/the9/GE_V5/images/main_35.jpg); background-position:right top; background-repeat:no-repeat; width:435px; height:6px; overflow:hidden; } .content_bottom_left_inner_right_hdzq_dc{ width:391px; overflow:hidden; margin:0px auto; background-image:url(/works/the9/GE_V5/images/slide_top.jpg); height:9px; } .content_bottom_left_inner_right_hdzq_dc_bg{ background-image:url(/works/the9/GE_V5/images/slide_bg.jpg); background-position:center top; background-repeat:repeat-y; height:auto; overflow:hidden; width:411px; margin:0px auto; } .content_bottom_left_inner_right_hdzq_dc_bg_inner{ background-image:url(/works/the9/GE_V5/images/slide_bottom.jpg); background-position:center bottom; background-repeat:no-repeat; height:201px; overflow:hidden; width:411px; padding:0px 0px 6px 0px; } .content_bottom_left_inner_right_hdzq_dc_arrow{ padding:50px 0px 0px 0px; float:left; height:auto; overflow:hidden; } .ar_img{ cursor:pointer; } .ar_img2{ cursor:default; } .content_bottom_left_inner_right_hdzq_dc_content{ width:356px; padding:6px 11px; height:auto; overflow:hidden; float:left; } .slider_img_container{ width:356px; margin:0px auto; overflow:hidden; } .slide_img{ margin-left:-87px; white-space:nowrap; } .slide_img div{ display:none; width:0px; height:0px; overflow:hidden; } .slide_img img{ border:#ECECEC 2px solid; cursor:pointer; } .content_bottom_left_inner_right_hdzq_dc_content_line{ border-bottom:#988A85 1px dotted; text-align:center; font-size:14px; font-weight:bold; color:#BC3232; padding:6px 0px; } * +html .content_bottom_left_inner_right_hdzq_dc_content_line{ padding:7px 0px; } * html .content_bottom_left_inner_right_hdzq_dc_content_line{ padding:7px 0px; } .content_bottom_left_inner_right_hdzq_dc_content_txt{ background-image:url(/works/the9/GE_V5/images/dot4.jpg); background-position:left 6px; background-repeat:no-repeat; padding:4px 0px 0px 19px; line-height:18px; color:#3B1200; } </ style > < script language="javascript" type="text/javascript"> var xp=-87,s,xf,j=8,lr=1,dir,timer,as=0,asb=1,timer2,total,con,ints=0,ttimer=0; var txt=new Array(); function slide(n){ clearTimeout(timer2); ints=0; if(n==0){ document.getElementById("arl").className="ar_img2"; }else if(n==total){ document.getElementById("arr").className="ar_img2"; }else if(n< 0 ){ n=0; return false; }else if(n>total){ n=total; return false; }else{ document.getElementById("arr").className="ar_img"; document.getElementById("arl").className="ar_img"; } s=document.getElementById("slimg"),xf=-(91+178*(n-1)+(n-1)*6); txt=(con[n].getElementsByTagName("div")[0].innerHTML).split("|"); getid("ititle").innerHTML=txt[0]; getid("itime").innerHTML=txt[1]; getid("icon").innerHTML=txt[2]; if(lr< n ){ dir=1; }else if(lr>n){ dir=0; }else{ dir=2; } as=lr=n; animation(); return true; } function animation(){ j++; if(dir==1){ xp-=j; timer=setTimeout("animation()",20); s.style.marginLeft=xp+"px"; if(xp<=xf){ s.style.marginLeft=xf+"px"; xp=xf; clearTimeout(timer); j=8; } } if(dir==0){ xp+=j; timer=setTimeout("animation()",20); s.style.marginLeft=xp+"px"; if(xp>=xf){ s.style.marginLeft=xf+"px"; xp=xf; clearTimeout(timer); j=8; } } } function sli(d){ clearTimeout(timer2); ints=0; if(d==1){ slide(lr-1); }else{ slide(lr+1); } } function start_slide(){ total=document.getElementById("slimg").getElementsByTagName("span").length-1; con=document.getElementById("slimg").getElementsByTagName("span"); setTimeout("start_slide()",10000); if(ints==0){ ntval=setInterval("auto_slide()",7000);} } function auto_slide(){ if(ttimer==0){ start_slide(); ttimer=1; } if(ints==0){ clearInterval(ntval); ints=1; } as+=asb; slide(as); if(as<=0){ asb=1; as=0; }else if(as>=total){ asb=-1; as=total; } timer2=setTimeout("auto_slide()",4000); } function getid(id){ return document.getElementById(id); } </ script > < title >滑动切换图片</ title > </ head > < body onload="auto_slide()"> < div class="content_bottom_left_inner_right_hdzq_bg"> < div class="content_bottom_left_inner_right_hdzq_dc"></ div > < div class="content_bottom_left_inner_right_hdzq_dc_bg"> < div class="content_bottom_left_inner_right_hdzq_dc_bg_inner"> < div class="content_bottom_left_inner_right_hdzq_dc_arrow">< img src="/works/the9/GE_V5/images/arrow_left.jpg" width="16" height="71" class="ar_img" onclick="sli(1)" id="arl"/></ div > < div class="content_bottom_left_inner_right_hdzq_dc_content"> < div class="slider_img_container"> < div class="slide_img" id="slimg"> < span >< img src="/works/the9/GE_V5/images/slide_img0.jpg" width="174" height="74" onclick="slide(0)" title="图片1"/> < div >1-全民有7调查|活动时间:淡淡的-10月30日|活动奖励:DELL哦本电脑 点卡等</ div > </ span > < span >< img src="/works/the9/GE_V5/images/slide_img1.jpg" width="174" height="74" onclick="slide(1)" title="图片2"/> < div >2-全22奖、|活动时间:55510月30日|活地方励:电脑 点卡等</ div > </ span > < span >< img src="/works/the9/GE_V5/images/slide_img2.jpg" width="174" height="74" onclick="slide(2)" title="图片3"/> < div >3-全民有奖|活fg间:9月545日|活哦励:DELL笔记本电脑 点卡等活哦励:DELL笔记本电脑 点卡等活哦励:DELL笔记本电脑 点卡等点卡等活哦励</ div > </ span > < span >< img src="/works/the9/GE_V5/images/slide_img0.jpg" width="174" height="74" onclick="slide(3)" title="图片4"/> < div >4-55有奖大调查|活动时间:9月1日-10月30日|活:DELL笔记本电脑 点卡等</ div > </ span > < span >< img src="/works/the9/GE_V5/images/slide_img1.jpg" width="174" height="74" onclick="slide(4)" title="图片5"/> < div >5-全民有破译|稍等时间:9月1日-10月30日|活动等等励:DEL本电脑 点卡等</ div > </ span > < span >< img src="/works/the9/GE_V5/images/slide_img2.jpg" width="174" height="74" onclick="slide(5)" title="图片6"/> < div >6-全地方调查|活而间:9月搜索10而日|活励:DELL笔记脑 点卡等</ div > </ span > </ div > </ div > < div class="content_bottom_left_inner_right_hdzq_dc_content_line" id="ititle">全民有奖调查</ div > < div class="content_bottom_left_inner_right_hdzq_dc_content_txt" id="itime">活动时间:9月1日-10月30日</ div > < div class="content_bottom_left_inner_right_hdzq_dc_content_txt" id="icon">活动奖励:DELL笔记本电脑 点卡等等等等ELL笔记本电脑点卡等等等等...</ div > </ div > < div class="content_bottom_left_inner_right_hdzq_dc_arrow">< img src="/works/the9/GE_V5/images/arrow_right.jpg" width="16" height="71" class="ar_img" onclick="sli(2)" id="arr"/></ div > </ div > </ div > </ div > </ body > </ html > |
作者:【唐】三三
出处:https://www.cnblogs.com/tangge/archive/2010/12/02/1894931.html
版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具