ecshop首页滚动仿京东全球购大图配2小图

109 篇文章 0 订阅

ecshop首页滚动仿京东全球购大图配2小图


做这个使用到了插件jquery.SuperSlide.js

targetCell:切换元素对象,处理内容切换元素非包裹状态下等情况,实现更多效果,处理更多情况,能和titCell、mainCell同时使用。

css:

.root61 .index_slide{width: 100%; min-width: 1210px; max-width: 1920px; height: 468px; margin: 0 auto; overflow: hidden; position: relative;}
.root61 .index_slide .slids{width: 100%; max-width: 1920px; height: 468px; overflow: hidden; position: absolute; top: 0; left: 0;}
.root61 .index_slide .slids .img_slide{width:100%; max-width: 1920px; height: 468px; position: absolute; top: 0px; left: 0px; z-index: 1; }
.root61 .index_slide .slids .img_slide li{width: 100%;  height: 468px; overflow: hidden;}
.root61 .index_slide .slids .img_slide li .img-out{position: relative; width: 1210px; height: 100%; margin: 0 auto;}
.root61 .index_slide .slids .img_slide li .img-out .img-inner{position: absolute; top: 0; left: 0; width: 1920px; height: 100%; margin-left: -355px;}
.root61 .index_slide .slids .img_slide li .img-out .img-inner img{width:100%; max-width: 1920px; height: 468px; }
.root61 .index_slide .small_img{width: 1210px; height: 468px; margin: 0 auto; position: relative;}
.root61 .index_slide .small_img .img_aside{position: absolute; top: 0px; right: -18px; z-index: 2; width: 234px;height: 468px; overflow: hidden; z-index: 5;}
.root61 .index_slide .small_img .img_aside img{width:234px; }
.root61 .index_slide .small_img .img_aside a:hover img{margin-left: -15px; -webkit-transition: all .4s ease-out; -moz-transition: all .4s ease-out; -ms-transition: all .4s ease-out; -o-transition: all .4s ease-out; transition: all .4s ease-out;}
.root61 .index_slide .small_img .slide_prev{position: absolute; top: 200px; left: 20%; display: inline-block; width: 16px; height: 30px; background: url('images/arrow2_1.png') no-repeat; z-index: 5;}
.root61 .index_slide .small_img .slide_prev:hover{background: url('images/arrowh2_1.png') no-repeat; }
.root61 .index_slide .small_img .slide_next{position: absolute; top: 200px; right: 40px; display: inline-block; width: 16px; height: 30px; background: url('images/arrow2_2.png') no-repeat; z-index: 5;}
.root61 .index_slide .small_img .slide_next:hover{background: url('images/arrowh2_2.png') no-repeat; }
.root61 .index_slide .small_img .slide_tips{position: absolute; bottom: 12px; right: 22%; height: 20px; z-index: 5;}
.root61 .index_slide .small_img .slide_tips li{display: inline-block; cursor: pointer; width: 14px; height: 14px; line-height: 14px; margin-left: 8px; text-align: center; color: #db2e26; background: url('images/index2016/banner_bg2.png') no-repeat;}
.root61 .index_slide .small_img .slide_tips .on,
.root61 .index_slide .small_img .slide_tips li:hover{background: url('images/index2016/banner_bg1.png') no-repeat; color: #fff}


html:

<div class="index_slide" id="index_slide">
    <div class="small_img" id="small_img">
        <ul class="img_aside">
            <li>
                {foreach from=$banner_small item=bs name=small}
                {$bs.img_url_format}
                {if $smarty.foreach.small.iteration % 2 eq 0 and $smarty.foreach.small.iteration lt $smarty.foreach.small.total}
            </li>
            <li>
                {/if}
                {/foreach}
            </li>
        </ul>
        <a class="slide_prev" href="javascript:void(0)"></a>
        <a class="slide_next" href="javascript:void(0)"></a>
        <div class="slide_tips hd">
            <ul class="tips">
                {foreach from=$banner item=bn name=b}
                {if $smarty.foreach.b.index eq 0}
                <li class="on">&nbsp;</li>
                {else}
                <li>&nbsp;</li>
                {/if}
                {/foreach}
            </ul>
        </div>
    </div>
    <div class="slids" id="slids">
        <ul class="img_slide">
            {foreach from=$banner item=bn}
            <li>
                <div class="img-out">
                    <div class="img-inner">{$bn.img_url_format}</div>
                </div>
            </li>
            {/foreach}
        </ul>
    </div>
</div>

js:

$(".index_slide").slide({mainCell:".small_img ul",  targetCell: ".img_slide li", prevCell:".slide_prev",nextCell:".slide_next", autoPlay:true, interTime: 4000, easing:"easeOutBounce"});

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ecshop首页幻灯js版 参考 www.chinahongjiu.net 使用方法 1、将文件夹下载到 data/flashdata 中 2、修改admin文件夹中的flashplay.php 大约 870行添加 case 'Myjs';注意文件夹名称要一直,否则更新不了。这样就可以到后台调用了 样式自己调整 3、更新了js ,解决的部分bug,替换即可 var mylnk=""; var mytxt=""; var mypic=""; var s1="",s2="",s3=""; function show_flash() { mylnk=links.split("|"); mytxt=texts.split("|"); mypic=pics.split("|"); s1="",s2="",s3=""; cpn=mylnk.length; for(i=0;i<mylnk.length;i++) { s1+='<li id="Myop'+i+'" ></li>'; s2+='<li id="Myjs'+i+'" onmouseover="Myjsch(\'Myjs'+i+'\',\''+mypic[i]+'\')" onmouseout="Myjscl(\'Myjs'+i+'\')" ref="'+mypic[i]+'"><a href="'+unescape(mylnk[i])+'">'+mytxt[i]+'</a></li>'; } document.getElementById('flash_cycle_image').innerHTML = '<div class="i_topcenter">'+"\n"+'<div class="slides" >'+"\n"+'<a href="'+mylnk[0]+'" id="slide-a"><img id="slide-pic" src="'+mypic[0]+'"/></a>'+"\n"+'<ul class="slide-li" id="op">'+"\n"+s1+"\n"+'</ul><ul class="slide-li" id="slide-txt">'+"\n"+s2+'</ul>'+"\n"+'</div>'+"\n"+' </div>'; document.getElementById("Myjs0").style.background="#ff0000"; if(document.all)document.getElementById("slide-pic").filters[0].enabled=false; ss=""; timen=2000; cp=0; obj=document.getElementById("slide-pic"); cpn=document.getElementById("slide-txt").getElementsByTagName("li").length; ss= window.setInterval(function() { if(cp<cpn-1){cp++; } else{ cp=0 } if(document.all){ obj.filters.blendtrans.Apply(); obj.filters[0].enabled=false; obj.filters.blendtrans.Play(); } obj.src=document.getElementById("Myjs"+cp).getAttribute("ref"); for(j=0;j<cpn;j++){ if(j==cp){ document.getElementById("Myjs"+j).style.background="#ff0000"; document.getElementById("slide-a").href=unescape(mylnk[j]); } else { document.getElementById("Myjs"+j).style.background=""; } } },timen); //mystart(); } LoadCSS("data/flashdata/Myjs/mycss.css"); $importjs('data/flashdata/Myjs/data.js', show_flash); function Myjsch(sid,ref) { window.clearInterval(ss); if(document.all){ obj.filters.blendtrans.Apply(); obj.filters[0].enabled=false; obj.filters.blendtrans.Play(); } obj.src=ref; for(i=0;i<cpn;i++) { if("Myjs"+i==sid) { document.getElementById("Myjs"+i).style.background="#cc3333"; document.getElementById("slide-a").href=unescape(mylnk[i]); } else { document.getElementById("Myjs"+i).style.background=""; } } } function Myjscl(sid) { cp=sid.substring(4); ss= window.setInterval(function() { if(cp<cpn-1){cp++; } else{ cp=0 } if(document.all){ obj.filters.blendtrans.Apply(); obj.filters[0].enabled=false; obj.filters.blendtrans.Play(); } obj.src=document.getElementById("Myjs"+cp).getAttribute("ref"); for(j=0;j<cpn;j++){ if(j==cp){ document.getElementById("Myjs"+j).style.background="#ff0000"; document.getElementById("slide-a").href=unescape(mylnk[j]); } else { document.getElementById("Myjs"+j).style.background=""; } } },timen); }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值