北京网店建设
网站地图
RSS订阅
匿名投稿
开网店送空间和顶级域名
您的位置:北京网店建设 > 网店建设 > ecshop模板制作

ecshop模板|京东商城图片向上滚动代码

作者:admin 来源:未知 日期:2009-12-6 0:06:06 人气: 标签:ecshop免费模板 ecshop模板 ecshop模板制作 ecshop模板开发 ecshop模板操作
导读:由北京OK模板之家 www.ok-moban.com 整理修改 效果演示地址:http://www.ok-moban.com/moban/2009jingdong/http://www.ok-moban.com/moban/2009baby/============
由北京OK模板之家 www.ok-moban.com 整理修改

效果演示地址

http://www.ok-moban.com/moban/2009jingdong/

http://www.ok-moban.com/moban/2009baby/

==============================================
360 for ecshop 2.7.0 全新发布
http://bbs.ecshop.com/viewthread.php?tid=92060

仿京东360 加强版 2.7.0模板(包含放大镜和首页评论)
http://bbs.ecshop.com/thread-95439-1-1.html

以上模板可以直接下载附件文件,覆盖即可使用

recommend_new.lbi UTF版本文件下载:
recommend_new_UTF.rar (1.51 KB)
recommend_new.lbi GBK版本文件下载:
recommend_new_GBK.rar (1.5 KB)

==============================================
滚动代码原型:
起作用的是控制其中的ID
具体代码如下:
[Quote title="引用"]
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  4. <meta http-equiv="Content-Language" content="zh-CN">
  5. <title>北京OK模板提供</title>
  6. <style type="text/css">
  7. *{font-size:12px;}
  8. #scrollBox2{width:150px; height:64px; line-height:22px; overflow:hidden; background-color:#eee;}
  9. </style>
  10. </head>
  11. <body>
  12. 国家 汇率名称 今日汇率
  13. <div id="scrollBox2">
  14. 美元USD ŀ.775%<br />
  15. 港币HKD ŀ.75%<br />
  16. 英镑GBP ŀ.50%<br />
  17. 欧元EUR ŀ.25%<br />
  18. 日元JPY ŀ.01%<br />
  19. </div>
  20. <script>
  21. window.onload=function(){
  22.   new Marquee(
  23.     "scrollBox2",  //容器ID<br />
  24.     0,  //向上滚动(0向上 1向下 2向左 3向右)<br />
  25.     2,  //滚动的步长<br />
  26.     200,  //容器可视宽度<br />
  27.     64,  //容器可视高度<br />
  28.     50,  //定时器 数值越小,滚动的速度越快(1000=1秒,建议不小于20)<br />
  29.     2000,  //间歇停顿时间(0为不停顿,1000=1秒)<br />
  30.     1000,  //开始时的等待时间(0为不等待,1000=1秒)<br />
  31.     22  //间歇滚动间距(可选)<br />
  32.     );
  33.   };
  34. function Marquee(){
  35.   this.ID=document.getElementById(arguments[0]);
  36.   this.Direction=arguments[1];
  37.   this.Step=arguments[2];
  38.   this.Width=arguments[3];
  39.   this.Height=arguments[4];
  40.   this.Timer=arguments[5];
  41.   this.WaitTime=arguments[6];
  42.   this.StopTime=arguments[7];
  43.   if(arguments[8]){this.ScrollStep=arguments[8];}else{this.ScrollStep=this.Direction>1?this.Width:this.Height;}
  44.   this.CTL=this.StartID=this.Stop=this.MouseOver=0;
  45.   this.ID.style.overflowX=this.ID.style.overflowY="hidden";
  46.   this.ID.noWrap=true;
  47.   this.ID.style.width=this.Width;
  48.   this.ID.style.height=this.Height;
  49.   this.ClientScroll=this.Direction>1?this.ID.scrollWidth:this.ID.scrollHeight;
  50.   this.ID.innerHTML+=this.ID.innerHTML;
  51.   this.Start(this,this.Timer,this.WaitTime,this.StopTime);
  52.   }
  53. Marquee.prototype.Start=function(msobj,timer,waittime,stoptime){
  54.   msobj.StartID=function(){msobj.Scroll();}
  55.   msobj.Continue=function(){
  56.     if(msobj.MouseOver==1){setTimeout(msobj.Continue,waittime);}
  57.     else{clearInterval(msobj.TimerID); msobj.CTL=msobj.Stop=0; msobj.TimerID=setInterval(msobj.StartID,timer);}
  58.     }
  59.   msobj.Pause=function(){msobj.Stop=1; clearInterval(msobj.TimerID); setTimeout(msobj.Continue,waittime);}
  60.   msobj.Begin=function(){
  61.     msobj.TimerID=setInterval(msobj.StartID,timer);
  62.     msobj.ID.onmouseover=function(){msobj.MouseOver=1; clearInterval(msobj.TimerID);}
  63.     msobj.ID.onmouseout=function(){msobj.MouseOver=0; if(msobj.Stop==0){clearInterval(msobj.TimerID); msobj.TimerID=setInterval(msobj.StartID,timer);}}
  64.     }
  65.   setTimeout(msobj.Begin,stoptime);
  66.   }
  67. Marquee.prototype.Scroll=function(){
  68.   switch(this.Direction){
  69.     case 0:
  70.       this.CTL+=this.Step;
  71.       if(this.CTL>=this.ScrollStep&&this.WaitTime>0){this.ID.scrollTop+=this.ScrollStep+this.Step-this.CTL; this.Pause(); return;}
  72.       else{if(this.ID.scrollTop>=this.ClientScroll) this.ID.scrollTop-=this.ClientScroll; this.ID.scrollTop+=this.Step;}
  73.       break;
  74.     case 1:
  75.       this.CTL+=this.Step;
  76.       if(this.CTL>=this.ScrollStep&&this.WaitTime>0){this.ID.scrollTop-=this.ScrollStep+this.Step-this.CTL; this.Pause(); return;}
  77.       else{if(this.ID.scrollTop<=0) this.ID.scrollTop+=this.ClientScroll; this.ID.scrollTop-=this.Step;}
  78.       break;
  79.     case 2:
  80.       this.CTL+=this.Step;
  81.       if(this.CTL>=this.ScrollStep&&this.WaitTime>0){this.ID.scrollLeft+=this.ScrollStep+this.Step-this.CTL; this.Pause(); return;}
  82.       else{if(this.ID.scrollLeft>=this.ClientScroll) this.ID.scrollLeft-=this.ClientScroll; this.ID.scrollLeft+=this.Step;}
  83.       break;
  84.     case 3:
  85.       this.CTL+=this.Step;
  86.       if(this.CTL>=this.ScrollStep&&this.WaitTime>0){this.ID.scrollLeft-=this.ScrollStep+this.Step-this.CTL; this.Pause(); return;}
  87.       else{if(this.ID.scrollLeft<=0) this.ID.scrollLeft+=this.ClientScroll; this.ID.scrollLeft-=this.Step;}
  88.       break;
  89.     }
  90.   }
  91. </script>
  92. </body>
  93. </html>
复制代码
[/Quote]
本文连接地址:http://www.511sj.com/html/wangdianjianshe/ecshop_mobanzhizuo/155.Html

编辑整理:北京网店建设 ecshop模板 ecshop模板

共有:条评论信息评论信息
发表评论
姓 名:
验证码: