| 一个新型动画脚本:http://www.superslide2.com/ 
 硬盘位置:E:\XXXX系统\插件宝库\MsClass
 容错极简版20190118:
 DIV:
 <div class="honor container p-y-60">$func_article(para=Honor,rows=10,title=10)$</div>
 CSS:
 #Box li{ display: inline-flex; flex-flow: column wrap; width:300px; height: 380px; margin-right:20px;}
 #Box li .thumbs,#Box li .thumbs a{ display: flex; justify-content: center; align-items: center; height: calc(100% - 40px);}
 #Box li .thumbs img{ max-width:100%; max-height: 100%; width: auto; height: auto;}
 #Box li > a{ display: block; line-height:40px; font-size:1rem; text-align: center;}
 JS:
 if($(".honor #ArticleView").length>0){
 $(".honor #ArticleView ul").attr("id","Box")
 $(".honor #ArticleView").attr("id","Slider")
 new Marquee(
 {
 MSClass : ["Slider","Box"],
 Direction : 2,
 Step : [0.5,"easeOutElastic"],//连续滚动设置为0
 Width : 1200,
 Height : 380,
 Timer : 1,   //控制滚动快慢
 DelayTime : 5000,//连续滚动设置为0
 WaitTime : 3000,
 ScrollStep: 320,//连续滚动可以删除
 AutoStart : 1
 });
 }
 
 DIV:
 <div class="photo">$func_article(css=Photo,title=0,para=Corporate,rows=6)$</div>
 
 CSS:
 <!--全局适用于1100宽屏-->
 #ArticleView ul li{ float:left; display:block; width:354px; height:300px; text-align:center; margin-right:16px; margin-bottom:20px; border:1px solid #ccc;}
 #ArticleView ul li:nth-child(3n){ margin-right:0;}
 #ArticleView ul li:hover{ border:1px solid #19af05;}
 #ArticleView ul li img{ width:calc(100% - 20px); height:calc(100% - 60px); margin:10px;}
 #ArticleView ul li .atext{ display:block; line-height:30px; height:30px;}
 <!--版块调整长宽-->
 .photo #ArticleView ul li{ width:378px; height:378px; margin:0;}
 
 JS:
 if(jQuery("#Photo #ArticleView").length>0){
 new Marquee(
 {
 MSClass : ["Photo","ArticleView"],
 Direction : "top",
 Step : [0.5,"easeOutElastic"],
 Width : 380,
 Height : 380,
 Timer : 1,
 DelayTime : 5000,
 WaitTime : 3000,
 ScrollStep: 380,
 AutoStart : 1
 });
 }
 此例应用于模板la(wuhula)
 
 问题:如果出现两个同时滚动时,第二个动画失效!
 解决办法:<div class="case">$func_article(sid=CaseBox,css=Case,title=0,para=Case,rows=6)$</div>红色部分为必须增加的部分,避免重复使用ArticleView的调用,动画如下:
 
 if(jQuery("#Photo #ArticleView").length>0){
 new Marquee(
 {
 MSClass : ["CaseBox","Case"],
 Direction : "top",
 Step : [0.5,"easeOutElastic"],
 Width : 380,
 Height : 380,
 Timer : 1,
 DelayTime : 5000,
 WaitTime : 3000,
 ScrollStep: 380,
 AutoStart : 1
 });
 }
 红色部分使用了SID与CSS的自定义值,而不再使用ArticleView,注意sid的值在前。
 特别提醒:以上适合于上下滚动,左右滚动会出现跳位现象,具体解法附后。
 
 适用于左右滚动的思路是:用jquery的attr增加ID值,再调用new Marquee,代码如下:
 DIV:
 $func_product(navi=Navigator,css=Product,para=Product,title=10,rows=10,memo=2)$
 JS:
 if($("#Product #ProductView").length>0){
 $("#Product ul").attr("ID","SliderContent");//用JS来增补ID
 new Marquee(
 {
 MSClass : ["Product","SliderContent"],
 Direction : 2,
 Step :2,
 Width : 1200,
 Height : 300,
 Timer : 1,
 DelayTime : 1000,
 WaitTime : 1000,
 ScrollStep: 307,
 AutoStart : 1
 });
 }
 
 上文去CSS再简化写法:
 CSS:
 $func_product(navi=Navigator,para=Product,title=10,rows=10,memo=2)$
 JS:
 if($("#ProductView").length>0){
 $("#ProductView ul").attr("ID","SliderContent");
 new Marquee(
 {
 MSClass : ["ProductView","SliderContent"],
 Direction : 2,
 Step :2,
 Width : 1200,
 Height : 300,
 Timer : 1,
 DelayTime : 1000,
 WaitTime : 1000,
 ScrollStep: 307,
 AutoStart : 1
 });
 }
 
 |