Authored by 2586703@qq.com

查看大图功能

... ... @@ -81,8 +81,10 @@
<div class="layout-item tiled">
<div class="image-box">
<a href="javascript:;">
<img src="http://img01.res.yoho.cn/blogimg/2014/10/22/17/01a9b77ff892507e57a4e334634598bad0.gif" alt="">
<img data-original="http://img01.res.yoho.cn/blogimg/2014/10/22/17/01a9b77ff892507e57a4e334634598bad0.gif" src="http://img01.res.yoho.cn/blogimg/2014/10/22/17/01a9b77ff892507e57a4e334634598bad0.gif" alt="">
</a>
<a class="pic-tip" href="javascript:;">banana</a>
<a class="pic-tip" href="javascript:;">111111111111111</a>
</div>
<div class="content">
<p>content</p>
... ... @@ -92,8 +94,10 @@
<div class="layout-item tiled">
<div class="image-box">
<a href="javascript:;">
<img src="http://img02.res.yoho.cn/blogimg/2014/10/23/17/020aba6cb71b6620e4e8dd50658a1daf03.jpg" alt="">
<img data-original="http://img02.res.yoho.cn/blogimg/2014/10/23/17/020aba6cb71b6620e4e8dd50658a1daf03.jpg" src="http://img02.res.yoho.cn/blogimg/2014/10/23/17/020aba6cb71b6620e4e8dd50658a1daf03.jpg" alt="">
</a>
<a class="pic-tip" href="javascript:;">122</a>
<a class="pic-tip" href="javascript:;">33</a>
</div>
<div class="content">
<p>contentcontentco ntentconten tcontentc ontentc ontentcontentcontent</p>
... ... @@ -293,7 +297,7 @@
<script type="text/javascript">
seajs.use(['jquery','channel'],function($,channel){
channel.common();
channel.index();
channel.show();
})
</script>
</html>
\ No newline at end of file
... ...
... ... @@ -87,7 +87,7 @@
<div class="layout-item clearfix">
<div class="image-box">
<a href="javascript:;">
<img src="http://img01.res.yoho.cn/blogimg/2014/10/22/17/01a9b77ff892507e57a4e334634598bad0.gif" alt="">
<img data-original="http://img01.res.yoho.cn/blogimg/2014/10/22/17/01a9b77ff892507e57a4e334634598bad0.gif" src="http://img01.res.yoho.cn/blogimg/2014/10/22/17/01a9b77ff892507e57a4e334634598bad0.gif" alt="">
</a>
</div>
<div class="content">
... ... @@ -101,7 +101,7 @@
<div class="layout-item clearfix">
<div class="image-box">
<a href="javascript:;">
<img src="http://img02.res.yoho.cn/blogimg/2014/10/23/17/020aba6cb71b6620e4e8dd50658a1daf03.jpg" alt="">
<img data-original="http://img02.res.yoho.cn/blogimg/2014/10/23/17/020aba6cb71b6620e4e8dd50658a1daf03.jpg" src="http://img02.res.yoho.cn/blogimg/2014/10/23/17/020aba6cb71b6620e4e8dd50658a1daf03.jpg" alt="">
</a>
</div>
<div class="content">
... ... @@ -290,7 +290,7 @@
<script type="text/javascript">
seajs.use(['jquery','channel'],function($,channel){
channel.common();
channel.index();
channel.siteActivity();
})
</script>
</html>
\ No newline at end of file
... ...
.yoho-nav{height:34px;line-height:34px;background:#f4f4f4;border-bottom:1px solid #d8d8d8}.yoho-nav ul{float:left;padding-left:10px}.yoho-nav ul li{float:left;position:relative;width:100px;cursor:pointer}.yoho-nav ul li span{display:block;width:100%;height:100%;line-height:37px;text-align:center}.yoho-nav ul li a{width:100%;height:100%;text-align:center;color:#000000;display:none}.yoho-nav ul li a:focus{outline:none}.yoho-nav ul li.current{height:35px;line-height:35px;border-right:1px solid #d8d8d8;border-left:1px solid #d8d8d8;background:#fff}.yoho-nav ul li:hover span{display:none}.yoho-nav ul li:hover a{display:block}.yoho-nav .contact-btn{float:right;margin:0 15px;color:#aaaaaa}.header{padding:14px 0 0 0}.logo{margin:0 0 21px 0;height:79px;background:url("../images/yohood/logo.png") no-repeat center center}.nav{border-top:2px solid #000;border-bottom:2px solid #000}.nav ul{width:980px;margin:0 auto}.nav ul li{float:left;line-height:44px;width:122px}.nav ul li a{display:none;font-size:14px;color:#fff}.nav ul li a:focus{outline:none}.nav ul li span{display:block;text-align:center;font-size:14px;color:#000}.nav ul li:first-child{width:126px}.nav ul li:hover a,.nav ul li.current a{display:block;text-align:center;background:#000}.nav ul li:hover span,.nav ul li.current span{display:none}.slide-main{position:relative}.slide-box{position:relative;margin:16px 0 0 0;visibility:hidden;overflow:hidden}.slide-box .slide-wrap{height:468px;overflow:hidden;position:relative}.slide-box .slide-wrap .box{float:left;width:100%;position:relative}.slide-box .slide-wrap .box img{display:block;width:100%}.slide-navigator{position:absolute;left:0;right:0;bottom:-32px;text-align:center}.slide-navigator .dib{display:inline-block}.slide-navigator .dib a{float:left;width:10px;height:10px;margin:0 10px 0 0;background-image:url("../images/yohood/sprites.png");background-position:0 -144px}.slide-navigator .dib a:focus{outline:none}.slide-navigator .dib .on{background-position:0 -124px}.slide-control a{position:absolute;top:50%;margin:-28px 0 0 0;font-size:48px;color:#000}.slide-control a:focus{outline:none}.slide-control .slide-prev{left:-70px}.slide-control .slide-next{right:-70px}.content-tab{margin:30px 0 0 0;text-align:center}.content-tab ul{display:inline-block}.content-tab ul li{float:left;margin-left:18px}.content-tab ul li a{display:block;padding:0 10px;line-height:30px;color:#000;border:2px solid #7e7e7e;border-radius:2px;font-size:14px}.content-tab ul li a:focus{outline:none}.content-tab ul:first-child{margin-left:0}.content-tab ul li.current a{background:#000;color:#fff}.main-layout{width:1008px}.main-layout .layout-item{float:left;width:308px;margin:0 28px 26px 0}.main-layout .layout-item .image-box{position:relative}.main-layout .layout-item .image-box a{display:block}.main-layout .layout-item .image-box a img{display:block;margin:0 auto;max-width:100%}.main-layout .layout-item .image-box a:focus{outline:none}.main-layout .layout-item .image-box .item-tag{position:absolute;bottom:0;left:0;padding:0 11px;background:#000;line-height:26px;font-size:14px;color:#fff}.main-layout .layout-item .image-box .play-icon{position:absolute;width:36px;height:34px;background:url("../images/yohood/play.png");background-size:100% 100%;left:50%;top:50%;margin:-17px 0 0 -18px}.main-layout .layout-item .content h2{margin:15px 0 0 0}.main-layout .layout-item .content h2 a{line-height:24px;font-size:20px;font-weight:bold;color:#000}.main-layout .layout-item .content h2 a:focus{outline:none}.main-layout .layout-item .content p{margin:10px 0 0 0;font-size:14px;color:#000;line-height:20px}.main-layout .layout-item .content .time{margin:12px 0 0 0;color:#b2b2b2}.pagination{margin:56px 0 0 0;text-align:center}.pagination .pagination-inner{display:inline-block}.pagination .pagination-inner a{float:left;width:36px;height:30px;line-height:30px;font-size:14px;color:#999997}.pagination .pagination-inner a:focus{outline:none}.pagination .pagination-inner .current{background:#000;color:#fff;border-radius:2px}.cooperation-list{width:1005px;margin:12px 0 0 0}.cooperation-list li{float:left;margin:0 27px 27px 0}.cooperation-list li a{display:block}.cooperation-list li a:focus{outline:none}.cooperation-list li .img-box{width:172px;height:116px;border:1px solid #e0e0e0;display:table-cell;vertical-align:middle;text-align:center}.cooperation-list li .img-box:hover{border:1px solid #000}.cooperation-list li p{margin:16px 0 0 0;line-height:16px;text-align:center;color:#000}.limited-goods{position:relative;padding:30px 0 30px 0;background:#333333}.limited-goods h2{font-size:24px;color:#8b8b8b;font-weight:bold;text-align:center;background:url("../images/yohood/limited-line.png") no-repeat center center}.limited-slide-box{position:relative;width:944px;margin:28px auto 0;visibility:hidden;overflow:hidden}.limited-slide-box .slide-wrap{position:relative;overflow:hidden}.limited-slide-box .box{position:relative;float:left;width:100%}.goods-list{width:992px}.goods-list li{float:left;width:150px;margin:0 48px 0 0}.goods-list li .img-box{position:relative;height:200px;text-align:center;overflow:hidden}.goods-list li .img-box img{width:100%}.goods-list li .img-box span{position:absolute;left:0;bottom:0;width:55px;height:25px;line-height:25px;background:#000;color:#fff;font-size:14px;text-align:center}.goods-list li .img-box span.red{background:#ef3d00}.goods-list li .goods-name{margin:5px 0 0 0;line-height:18px;font-size:14px;color:#ccc}.goods-list li .price{margin:6px 0 0 0;line-height:18px;color:#ccc;font-size:12px}.limited-slide-control a{position:absolute;top:50%;left:50%;font-size:30px;color:#ebebeb}.limited-slide-control a:focus{outline:none}.limited-slide-control .limited-slide-prev{margin-left:-510px}.limited-slide-control .limited-slide-next{margin-left:480px}.limited-slide-control .disable{color:#4a4a4a}.return-top{position:fixed;bottom:410px;left:50%;margin-left:600px}.return-top a{color:#000}.return-top span{display:block}.share{position:fixed;z-index:99;left:50%;top:290px;margin-left:-642px}.share h4{font-size:14px;margin-bottom:5px}.share li{position:relative;width:34px;height:34px;margin-bottom:13px}.share li img{display:block;width:100%}.share .wx-qrcode-dialog{display:none;position:absolute;background:#fff url("../images/yohood/share-wx-bg.png");width:223px;height:220px;left:50px;top:-88px;padding:12px 0 0 0;text-align:center}.share .wx-qrcode-dialog .wx-popup-hd{margin-bottom:5px;font-size:16px}.share .wx-qrcode-dialog .wx-popup-bd{width:125px;height:125px;margin:0 auto}.share .wx-qrcode-dialog .wx-popup-bd img{display:block;width:100%}.share .wx-qrcode-dialog .wx-popup-ft{font-size:14px}html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,code,del,dfn,em,img,q,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,i{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}body{line-height:1.5}table{border-collapse:collapse;border-spacing:0}caption,th,td,b,strong{text-align:left;font-weight:normal}table,td,th{vertical-align:middle}blockquote:before,blockquote:after,q:before,q:after{content:""}blockquote,q{quotes:"" ""}a img{border:none}em,cite{font-style:normal}body{background:#fff;font:12px/1.5 "arial","helvetica","微软雅黑";color:#000;width:100%;height:100%;padding:0;margin:0}html{width:100%;height:100%;padding:0;margin:0}h1,h2,h3,h4,h5,h6{font-weight:normal;color:#111}a{text-decoration:none;cursor:pointer}dl,dt,dd,ul,li{list-style:none}.clearfix:before,.clearfix:after{content:"";display:table}.clearfix:after{clear:both}.clearfix{zoom:1;*zoom:1}@font-face{font-family:'iconfont';src:url("../fonts/iconfont.eot");src:url("../fonts/iconfont.eot?#iefix") format("embedded-opentype"),url("../fonts/iconfont.woff") format("woff"),url("../fonts/iconfont.ttf") format("truetype"),url("../fonts/iconfont.svg#iconfont") format("svg")}.iconfont{font-family:"iconfont" !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0.2px;-moz-osx-font-smoothing:grayscale}.bd{width:980px;margin:0 auto}.slide-main{position:relative}.slide-box{position:relative;margin:16px 0 0 0;visibility:hidden;overflow:hidden}.slide-box .slide-wrap{height:468px;overflow:hidden;position:relative}.slide-box .slide-wrap .box{float:left;width:100%;position:relative}.slide-box .slide-wrap .box img{display:block;width:100%}.slide-navigator{position:absolute;left:0;right:0;bottom:-32px;text-align:center}.slide-navigator .dib{display:inline-block}.slide-navigator .dib a{float:left;width:10px;height:10px;margin:0 10px 0 0;background-image:url("../images/yohood/sprites.png");background-position:0 -144px}.slide-navigator .dib .on{background-position:0 -124px}.slide-control a{position:absolute;top:50%;margin:-28px 0 0 0;font-size:48px;color:#000}.slide-control .slide-prev{left:-70px}.slide-control .slide-next{right:-70px}.content-wrap{margin:50px 0 0 0}.cooperation{position:relative;margin:48px 0;height:118px;border:1px solid #000}.cooperation-slide-box{position:relative;width:800px;margin:0 auto;padding:28px 0 0 0;visibility:hidden;overflow:hidden}.cooperation-slide-box .slide-wrap{position:relative;overflow:hidden}.cooperation-slide-box .slide-wrap .box{position:relative;float:left;width:100%}.cooperation .partner{float:left;margin:0 50px 0 0}.cooperation .media{float:left;height:68px;padding:0 0 0 50px;border-left:1px solid #000}.cooperation h2{font-size:14px;line-height:20px}.cooperation ul li{float:left;height:60px;width:110px}.cooperation ul li a{width:110px;height:60px;display:table-cell;vertical-align:middle;text-align:center}.cooperation-slide-control a{position:absolute;top:50%;margin-top:-16px;color:#000;font-size:26px}.cooperation-slide-control .cooperation-slide-prev{left:20px}.cooperation-slide-control .cooperation-slide-next{right:20px}.cooperation-slide-control .disable{color:#d9d9d9}.activity-main{margin:30px 0 50px 0}.activity-content{display:none}.activity-content:first-child{display:block}.activity-content.current{display:block}.activity-content .section{width:820px;text-align:center;margin:0 auto 20px}.activity-content .section p{text-align:left;font-size:14px;line-height:18px;color:#000}.activity-content .section h4{text-align:left;font-weight:bold}.video-wrap .layout-item{height:362px;margin:0 28px 0 0}.video-wrap .layout-item .image-box{height:198px;overflow:hidden}.video-wrap .layout-item .image-box img{width:100%}.activity-cooperation .section{text-align:left;margin:0 0 12px 0}.activity-cooperation .section h2{color:#000;line-height:20px;font-size:18px;font-weight:bold}.contant-tab{margin:30px 0 0 0;text-align:center}.contant-tab ul{display:inline-block}.contant-tab ul li{float:left;margin-left:18px}.contant-tab ul li a{display:block;padding:0 10px;line-height:30px;color:#000;border:2px solid #7e7e7e;border-radius:2px;font-size:14px}.contant-tab ul:first-child{margin-left:0}.contant-tab ul li.current a{background:#000;color:#fff}.news-tab ul li{margin-left:8px}.news-main{margin:30px 0 50px 0}.brand-main{margin:50px 0}.search-wrap{position:relative;width:306px;height:36px;margin:0 auto;padding:0;line-height:36px}.search-wrap input{width:260px;height:36px;line-height:36px\9;padding:0 36px 0 10px;margin:0;border:none;background:url("../images/yohood/search-bg.png");outline:none}.search-wrap .search-btn{position:absolute;top:0px;right:10px;color:#000}.search-wrap .search-btn:focus{outline:none}.brand-content{margin:38px 0 0 0}.brand-content .no-search{display:none;margin:100px 0 120px 0;text-align:center;line-height:22px;font-size:16px}.brand-content .no-search a{font-size:16px;color:#000}.brand-content .no-search a:hover{text-decoration:underline}.brand-list li{float:left}.overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:1}.brand-introduction{display:none;position:fixed;width:644px;max-height:604px;top:50%;left:50%;margin:-314px 0 0 -352px;padding:24px 30px 30px;z-index:2;background:#fff}.brand-introduction h2{font-size:18px;color:#000;line-height:20px}.brand-introduction .brand-info{margin:20px 0 0 0;padding-bottom:30px;border-bottom:1px solid #e0e0e0}.brand-introduction .brand-info .pic{float:left;width:200px;height:200px;overflow:hidden;margin-top:6px}.brand-introduction .brand-info .pic img{width:100%}.brand-introduction .brand-info .text{float:left;margin:0 0 0 29px}.brand-introduction .brand-info .text p{width:414px;max-height:192px;overflow-x:hidden;margin:0;line-height:24px;font-size:14px}.brand-introduction .brand-info .text a{display:block;width:94px;height:33px;margin-top:15px;padding-left:34px;line-height:35px;border:1px solid #000;border-radius:4px;background:#fff;color:#000;background:url("../images/yohood/enter-store.png") no-repeat 10px center}.related-post h3{margin-top:28px;line-height:22px;font-size:18px}.related-post .post-list{margin-top:17px;width:666px}.related-post .post-list .layout-item{float:left;width:200px;margin-right:22px}.related-post .post-list .layout-item .image-box{height:128px;overflow:hidden}.related-post .post-list .layout-item .content h2{margin:8px 0 0 0;line-height:20px}.related-post .post-list .layout-item .content h2 a{font-size:14px;font-weight:normal}.video-list{margin:28px 0 50px}.site-activity-date{margin:38px 0 0 0;width:120px;line-height:38px;font-size:22px;color:#000;border-bottom:4px solid #000;text-align:center}.site-activity-content{float:left;width:738px}.site-activity-content .main-layout{width:auto;border-left:2px solid #e0e0e0;margin-left:96px;padding-bottom:50px}.site-activity-content .main-layout .layout-section{width:auto;position:relative;padding-top:84px}.site-activity-content .main-layout .layout-section .site-activity-intro{position:absolute;top:28px;left:18px;background:#000;border-radius:2px;padding:0 15px;color:#fff;line-height:28px}.site-activity-content .main-layout .layout-section .site-activity-intro span{position:absolute;left:-6px;top:0;width:6px;height:17px;background:url("../images/yohood/site-activity-intro-icon.png") no-repeat}.site-activity-content .main-layout .layout-section .site-activity-time{position:absolute;color:#000;left:-98px;top:35px}.site-activity-content .main-layout .layout-section .site-activity-icon{position:absolute;width:10px;height:10px;top:40px;left:-6px;background:url("../images/yohood/site-activity-icon.png") no-repeat}.site-activity-content .layout-item{float:none;width:630px;margin:0 0 0 18px}.site-activity-content .layout-item .image-box{float:left;width:310px;height:174px;overflow:hidden}.site-activity-content .layout-item .image-box a{display:table-cell;width:310px;height:174px;text-align:center;vertical-align:middle}.site-activity-content .layout-item .content{float:left;margin-left:28px;width:290px}.site-activity-tab{float:right;margin-top:79px}.site-activity-tab h4{line-height:42px;padding-top:14px;border-top:1px dashed #979797;font-size:14px;text-align:center}.site-activity-tab li{width:130px;margin-bottom:18px;line-height:42px;background:#fff;text-align:center;font-size:14px;border:2px solid #7e7e7e;border-radius:2px}.site-activity-tab li a{display:block;color:#000}.site-activity-tab .current{border-radius:0;background:#000;border-color:#000}.site-activity-tab .current a{color:#fff}.show-title{line-height:98px;font-size:32px;color:#0099bb;text-align:center}.show-wrap{padding-bottom:50px}.show-wrap .layout-item{height:396px}.show-wrap .image-box{height:308px;overflow:hidden}.show-wrap .image-box img{width:100%;height:100%}.detail-body{float:left;width:644px}.detail-title{margin:48px 0;font-size:28px}.detail-title h2,.detail-title h3{line-height:40px;font-weight:bold}.detail-slide-body{position:relative;width:100%;height:415px;overflow:hidden}.detail-slide-body .detail-slide-piclist{height:415px;overflow:hidden;position:relative}.detail-slide-body .detail-slide-piclist .box{float:left;width:644px;height:415px;line-height:415px;position:relative;background:#000;text-align:center}.detail-slide-body .detail-slide-piclist .box img{max-width:100%;vertical-align:middle}.slide-box{position:relative;margin:16px 0 0 0;visibility:hidden;overflow:hidden}.slide-box .slide-wrap{height:468px;overflow:hidden;position:relative}.slide-box .slide-wrap .box{float:left;width:100%;position:relative}.slide-box .slide-wrap .box img{display:block;width:100%}.slide-shadow a{position:absolute;width:322px;top:0;bottom:0}.slide-shadow a:focus{outline:none}.slide-shadow .slide-shadow-prev{left:0}.slide-shadow .slide-shadow-next{right:0}.detail-slide-big-ctrl a{display:none;position:absolute;font-size:40px;top:50%;color:#fff;margin-top:-30px;z-index:20}.detail-slide-big-ctrl a:focus{outline:none}.detail-slide-big-ctrl .slide-big-ctrl-prev{left:5px}.detail-slide-big-ctrl .slide-big-ctrl-next{right:5px}.detail-slide-ctrl{padding:15px 0 0 0;width:100%;height:60px;overflow:hidden;position:relative}.detail-slide-ctrl .detail-slide-ctrl-prev,.detail-slide-ctrl .detail-slide-ctrl-next{position:absolute;top:15px;width:30px;height:60px;line-height:60px;background:#e6e6e6;font-size:18px;text-align:center;color:#000}.detail-slide-ctrl .detail-slide-ctrl-prev{left:0}.detail-slide-ctrl .detail-slide-ctrl-next{right:0}.detail-slide-ctrl-tabs{position:relative;left:0;top:0}.detail-slide-ctrl-tabs li{position:relative;float:left;margin:0 0 0 8px}.detail-slide-ctrl-tabs li img{display:block;width:105px;height:60px}.detail-slide-ctrl-tabs li:first-child{margin:0}.detail-slide-ctrl-tabs li.current .border{position:absolute;left:0px;right:0px;top:0px;bottom:0px;border:2px solid #000}.detail-slide-ctrl-tabs li.current .arrow{position:absolute;top:-9px;left:50%;margin:0 0 0 -9px;width:0;height:0;border-left:9px solid transparent;border-right:9px solid transparent;border-bottom:9px solid black}.text-body{margin:25px 0;font-size:14px;line-height:28px}.text-body p{margin:25px 0}.detail-related-post h3{font-weight:bold}.detail-side{width:280px;float:right;padding-bottom:62px}.detail-ad li{margin-bottom:15px}.detail-ad li img{display:block}.app-download{width:278px;height:158px;margin-top:28px;border:1px solid #000}.app-download .qr{float:left;margin:22px 0 0 18px;width:114px;height:114px}.app-download .qr img{display:block;width:100%}.app-download .download-text{float:left;margin:20px 0 38px 12px;width:108px}.app-download .download-text img{display:block;width:50px}.app-download .download-text p{font-size:12px;color:#666}.app-download .download-text .yoho-name{font-size:18px;color:#000;font-weight:bold}.side-related-tab{border-bottom:1px solid #000}.side-related-tab a{float:left;width:140px;text-align:center;font-size:18px;line-height:38px;color:#000;font-weight:bold}.side-related-tab a.current{border-bottom:2px solid #000}.side-related-list{display:none}.side-related-list.current{display:block}.side-related-list .layout-item{float:none;margin:20px 0 0 0}.side-related-list .layout-item .image-box{float:left;width:82px;height:53px;overflow:hidden}.side-related-list .layout-item .image-box img{display:block;width:100%;height:100%}.side-related-list .layout-item .image-box .play-icon{width:20px;height:20px;margin:-10px 0 0 -10px}.side-related-list .layout-item .content{float:left;margin-left:16px;width:182px}.side-related-list .layout-item .content h2{margin:0}.side-related-list .layout-item .content h2 a{font-size:12px;font-weight:normal;line-height:20px}
.yoho-nav{height:34px;line-height:34px;background:#f4f4f4;border-bottom:1px solid #d8d8d8}.yoho-nav ul{float:left;padding-left:10px}.yoho-nav ul li{float:left;position:relative;width:100px;cursor:pointer}.yoho-nav ul li span{display:block;width:100%;height:100%;line-height:37px;text-align:center}.yoho-nav ul li a{width:100%;height:100%;text-align:center;color:#000000;display:none}.yoho-nav ul li a:focus{outline:none}.yoho-nav ul li.current{height:35px;line-height:35px;border-right:1px solid #d8d8d8;border-left:1px solid #d8d8d8;background:#fff}.yoho-nav ul li:hover span{display:none}.yoho-nav ul li:hover a{display:block}.yoho-nav .contact-btn{float:right;margin:0 15px;color:#aaaaaa}.header{padding:14px 0 0 0}.logo{margin:0 0 21px 0;height:79px;background:url("../images/yohood/logo.png") no-repeat center center}.nav{border-top:2px solid #000;border-bottom:2px solid #000}.nav ul{width:980px;margin:0 auto}.nav ul li{float:left;line-height:44px;width:122px}.nav ul li a{display:none;font-size:14px;color:#fff}.nav ul li a:focus{outline:none}.nav ul li span{display:block;text-align:center;font-size:14px;color:#000}.nav ul li:first-child{width:126px}.nav ul li:hover a,.nav ul li.current a{display:block;text-align:center;background:#000}.nav ul li:hover span,.nav ul li.current span{display:none}.slide-main{position:relative}.slide-box{position:relative;margin:16px 0 0 0;visibility:hidden;overflow:hidden}.slide-box .slide-wrap{height:468px;overflow:hidden;position:relative}.slide-box .slide-wrap .box{float:left;width:100%;position:relative}.slide-box .slide-wrap .box img{display:block;width:100%}.slide-navigator{position:absolute;left:0;right:0;bottom:-32px;text-align:center}.slide-navigator .dib{display:inline-block}.slide-navigator .dib a{float:left;width:10px;height:10px;margin:0 10px 0 0;background-image:url("../images/yohood/sprites.png");background-position:0 -144px}.slide-navigator .dib a:focus{outline:none}.slide-navigator .dib .on{background-position:0 -124px}.slide-control a{position:absolute;top:50%;margin:-28px 0 0 0;font-size:48px;color:#000}.slide-control a:focus{outline:none}.slide-control .slide-prev{left:-70px}.slide-control .slide-next{right:-70px}.content-tab{margin:30px 0 0 0;text-align:center}.content-tab ul{display:inline-block}.content-tab ul li{float:left;margin-left:18px}.content-tab ul li a{display:block;padding:0 10px;line-height:30px;color:#000;border:2px solid #7e7e7e;border-radius:2px;font-size:14px}.content-tab ul li a:focus{outline:none}.content-tab ul:first-child{margin-left:0}.content-tab ul li.current a{background:#000;color:#fff}.main-layout{width:1008px}.main-layout .layout-item{float:left;width:308px;margin:0 28px 26px 0}.main-layout .layout-item .image-box{position:relative}.main-layout .layout-item .image-box a{display:block}.main-layout .layout-item .image-box a img{display:block;margin:0 auto;max-width:100%}.main-layout .layout-item .image-box a:focus{outline:none}.main-layout .layout-item .image-box .item-tag{position:absolute;bottom:0;left:0;padding:0 11px;background:#000;line-height:26px;font-size:14px;color:#fff}.main-layout .layout-item .image-box .play-icon{position:absolute;width:36px;height:34px;background:url("../images/yohood/play.png");background-size:100% 100%;left:50%;top:50%;margin:-17px 0 0 -18px}.main-layout .layout-item .content h2{margin:15px 0 0 0}.main-layout .layout-item .content h2 a{line-height:24px;font-size:20px;font-weight:bold;color:#000}.main-layout .layout-item .content h2 a:focus{outline:none}.main-layout .layout-item .content p{margin:10px 0 0 0;font-size:14px;color:#000;line-height:20px}.main-layout .layout-item .content .time{margin:12px 0 0 0;color:#b2b2b2}.pagination{margin:56px 0 0 0;text-align:center}.pagination .pagination-inner{display:inline-block}.pagination .pagination-inner a{float:left;width:36px;height:30px;line-height:30px;font-size:14px;color:#999997}.pagination .pagination-inner a:focus{outline:none}.pagination .pagination-inner .current{background:#000;color:#fff;border-radius:2px}.cooperation-list{width:1005px;margin:12px 0 0 0}.cooperation-list li{float:left;margin:0 27px 27px 0}.cooperation-list li a{display:block}.cooperation-list li a:focus{outline:none}.cooperation-list li .img-box{width:172px;height:116px;border:1px solid #e0e0e0;display:table-cell;vertical-align:middle;text-align:center}.cooperation-list li .img-box:hover{border:1px solid #000}.cooperation-list li p{margin:16px 0 0 0;line-height:16px;text-align:center;color:#000}.limited-goods{position:relative;padding:30px 0 30px 0;background:#333333}.limited-goods h2{font-size:24px;color:#8b8b8b;font-weight:bold;text-align:center;background:url("../images/yohood/limited-line.png") no-repeat center center}.limited-slide-box{position:relative;width:944px;margin:28px auto 0;visibility:hidden;overflow:hidden}.limited-slide-box .slide-wrap{position:relative;overflow:hidden}.limited-slide-box .box{position:relative;float:left;width:100%}.goods-list{width:992px}.goods-list li{float:left;width:150px;margin:0 48px 0 0}.goods-list li .img-box{position:relative;height:200px;text-align:center;overflow:hidden}.goods-list li .img-box img{width:100%}.goods-list li .img-box span{position:absolute;left:0;bottom:0;width:55px;height:25px;line-height:25px;background:#000;color:#fff;font-size:14px;text-align:center}.goods-list li .img-box span.red{background:#ef3d00}.goods-list li .goods-name{margin:5px 0 0 0;line-height:18px;font-size:14px;color:#ccc}.goods-list li .price{margin:6px 0 0 0;line-height:18px;color:#ccc;font-size:12px}.limited-slide-control a{position:absolute;top:50%;left:50%;font-size:30px;color:#ebebeb}.limited-slide-control a:focus{outline:none}.limited-slide-control .limited-slide-prev{margin-left:-510px}.limited-slide-control .limited-slide-next{margin-left:480px}.limited-slide-control .disable{color:#4a4a4a}.return-top{position:fixed;bottom:410px;left:50%;margin-left:600px}.return-top a{color:#000}.return-top span{display:block}.img-zoom{display:none;position:fixed;z-index:102;left:50%;top:50%}.img-zoom img{display:block}.img-zoom.show{display:block}.overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.8);z-index:101}.overlay.show{display:block}.share{position:fixed;z-index:99;left:50%;top:290px;margin-left:-642px}.share h4{font-size:14px;margin-bottom:5px}.share li{position:relative;width:34px;height:34px;margin-bottom:13px}.share li img{display:block;width:100%}.share .wx-qrcode-dialog{display:none;position:absolute;background:#fff url("../images/yohood/share-wx-bg.png");width:223px;height:220px;left:50px;top:-88px;padding:12px 0 0 0;text-align:center}.share .wx-qrcode-dialog .wx-popup-hd{margin-bottom:5px;font-size:16px}.share .wx-qrcode-dialog .wx-popup-bd{width:125px;height:125px;margin:0 auto}.share .wx-qrcode-dialog .wx-popup-bd img{display:block;width:100%}.share .wx-qrcode-dialog .wx-popup-ft{font-size:14px}html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,code,del,dfn,em,img,q,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,i{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}body{line-height:1.5}table{border-collapse:collapse;border-spacing:0}caption,th,td,b,strong{text-align:left;font-weight:normal}table,td,th{vertical-align:middle}blockquote:before,blockquote:after,q:before,q:after{content:""}blockquote,q{quotes:"" ""}a img{border:none}em,cite{font-style:normal}body{background:#fff;font:12px/1.5 "arial","helvetica","微软雅黑";color:#000;width:100%;height:100%;padding:0;margin:0}html{width:100%;height:100%;padding:0;margin:0}h1,h2,h3,h4,h5,h6{font-weight:normal;color:#111}a{text-decoration:none;cursor:pointer}a:focus{outline:none}dl,dt,dd,ul,li{list-style:none}.clearfix:before,.clearfix:after{content:"";display:table}.clearfix:after{clear:both}.clearfix{zoom:1;*zoom:1}@font-face{font-family:'iconfont';src:url("../fonts/iconfont.eot");src:url("../fonts/iconfont.eot?#iefix") format("embedded-opentype"),url("../fonts/iconfont.woff") format("woff"),url("../fonts/iconfont.ttf") format("truetype"),url("../fonts/iconfont.svg#iconfont") format("svg")}.iconfont{font-family:"iconfont" !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0.2px;-moz-osx-font-smoothing:grayscale}.bd{width:980px;margin:0 auto}.slide-main{position:relative}.slide-box{position:relative;margin:16px 0 0 0;visibility:hidden;overflow:hidden}.slide-box .slide-wrap{height:468px;overflow:hidden;position:relative}.slide-box .slide-wrap .box{float:left;width:100%;position:relative}.slide-box .slide-wrap .box img{display:block;width:100%}.slide-navigator{position:absolute;left:0;right:0;bottom:-32px;text-align:center}.slide-navigator .dib{display:inline-block}.slide-navigator .dib a{float:left;width:10px;height:10px;margin:0 10px 0 0;background-image:url("../images/yohood/sprites.png");background-position:0 -144px}.slide-navigator .dib .on{background-position:0 -124px}.slide-control a{position:absolute;top:50%;margin:-28px 0 0 0;font-size:48px;color:#000}.slide-control .slide-prev{left:-70px}.slide-control .slide-next{right:-70px}.content-wrap{margin:50px 0 0 0}.cooperation{position:relative;margin:48px 0;height:118px;border:1px solid #000}.cooperation-slide-box{position:relative;width:800px;margin:0 auto;padding:28px 0 0 0;visibility:hidden;overflow:hidden}.cooperation-slide-box .slide-wrap{position:relative;overflow:hidden}.cooperation-slide-box .slide-wrap .box{position:relative;float:left;width:100%}.cooperation .partner{float:left;margin:0 50px 0 0}.cooperation .media{float:left;height:68px;padding:0 0 0 50px;border-left:1px solid #000}.cooperation h2{font-size:14px;line-height:20px}.cooperation ul li{float:left;height:60px;width:110px}.cooperation ul li a{width:110px;height:60px;display:table-cell;vertical-align:middle;text-align:center}.cooperation-slide-control a{position:absolute;top:50%;margin-top:-16px;color:#000;font-size:26px}.cooperation-slide-control .cooperation-slide-prev{left:20px}.cooperation-slide-control .cooperation-slide-next{right:20px}.cooperation-slide-control .disable{color:#d9d9d9}.activity-main{margin:30px 0 50px 0}.activity-content{display:none}.activity-content:first-child{display:block}.activity-content.current{display:block}.activity-content .section{width:820px;text-align:center;margin:0 auto 20px}.activity-content .section p{text-align:left;font-size:14px;line-height:18px;color:#000}.activity-content .section h4{text-align:left;font-weight:bold}.video-wrap .layout-item{height:362px;margin:0 28px 0 0}.video-wrap .layout-item .image-box{height:198px;overflow:hidden}.video-wrap .layout-item .image-box img{width:100%}.activity-cooperation .section{text-align:left;margin:0 0 12px 0}.activity-cooperation .section h2{color:#000;line-height:20px;font-size:18px;font-weight:bold}.contant-tab{margin:30px 0 0 0;text-align:center}.contant-tab ul{display:inline-block}.contant-tab ul li{float:left;margin-left:18px}.contant-tab ul li a{display:block;padding:0 10px;line-height:30px;color:#000;border:2px solid #7e7e7e;border-radius:2px;font-size:14px}.contant-tab ul:first-child{margin-left:0}.contant-tab ul li.current a{background:#000;color:#fff}.news-tab ul li{margin-left:8px}.news-main{margin:30px 0 50px 0}.brand-main{margin:50px 0}.search-wrap{position:relative;width:306px;height:36px;margin:0 auto;padding:0;line-height:36px}.search-wrap input{width:260px;height:36px;line-height:36px\9;padding:0 36px 0 10px;margin:0;border:none;background:url("../images/yohood/search-bg.png");outline:none}.search-wrap .search-btn{position:absolute;top:0px;right:10px;color:#000}.search-wrap .search-btn:focus{outline:none}.brand-content{margin:38px 0 0 0}.brand-content .no-search{display:none;margin:100px 0 120px 0;text-align:center;line-height:22px;font-size:16px}.brand-content .no-search a{font-size:16px;color:#000}.brand-content .no-search a:hover{text-decoration:underline}.brand-list li{float:left}.overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:1}.brand-introduction{display:none;position:fixed;width:644px;max-height:604px;top:50%;left:50%;margin:-314px 0 0 -352px;padding:24px 30px 30px;z-index:2;background:#fff}.brand-introduction h2{font-size:18px;color:#000;line-height:20px}.brand-introduction .brand-info{margin:20px 0 0 0;padding-bottom:30px;border-bottom:1px solid #e0e0e0}.brand-introduction .brand-info .pic{float:left;width:200px;height:200px;overflow:hidden;margin-top:6px}.brand-introduction .brand-info .pic img{width:100%}.brand-introduction .brand-info .text{float:left;margin:0 0 0 29px}.brand-introduction .brand-info .text p{width:414px;max-height:192px;overflow-x:hidden;margin:0;line-height:24px;font-size:14px}.brand-introduction .brand-info .text a{display:block;width:94px;height:33px;margin-top:15px;padding-left:34px;line-height:35px;border:1px solid #000;border-radius:4px;background:#fff;color:#000;background:url("../images/yohood/enter-store.png") no-repeat 10px center}.related-post h3{margin-top:28px;line-height:22px;font-size:18px}.related-post .post-list{margin-top:17px;width:666px}.related-post .post-list .layout-item{float:left;width:200px;margin-right:22px}.related-post .post-list .layout-item .image-box{height:128px;overflow:hidden}.related-post .post-list .layout-item .content h2{margin:8px 0 0 0;line-height:20px}.related-post .post-list .layout-item .content h2 a{font-size:14px;font-weight:normal}.video-list{margin:28px 0 50px}.site-activity-date{margin:38px 0 0 0;width:120px;line-height:38px;font-size:22px;color:#000;border-bottom:4px solid #000;text-align:center}.site-activity-content{float:left;width:738px}.site-activity-content .main-layout{width:auto;border-left:2px solid #e0e0e0;margin-left:96px;padding-bottom:50px}.site-activity-content .main-layout .layout-section{width:auto;position:relative;padding-top:84px}.site-activity-content .main-layout .layout-section .site-activity-intro{position:absolute;top:28px;left:18px;background:#000;border-radius:2px;padding:0 15px;color:#fff;line-height:28px}.site-activity-content .main-layout .layout-section .site-activity-intro span{position:absolute;left:-6px;top:0;width:6px;height:17px;background:url("../images/yohood/site-activity-intro-icon.png") no-repeat}.site-activity-content .main-layout .layout-section .site-activity-time{position:absolute;color:#000;left:-98px;top:35px}.site-activity-content .main-layout .layout-section .site-activity-icon{position:absolute;width:10px;height:10px;top:40px;left:-6px;background:url("../images/yohood/site-activity-icon.png") no-repeat}.site-activity-content .layout-item{float:none;width:630px;margin:0 0 0 18px}.site-activity-content .layout-item .image-box{float:left;width:310px;height:174px;overflow:hidden}.site-activity-content .layout-item .image-box a{display:table-cell;width:310px;height:174px;text-align:center;vertical-align:middle}.site-activity-content .layout-item .content{float:left;margin-left:28px;width:290px}.site-activity-tab{float:right;margin-top:79px}.site-activity-tab h4{line-height:42px;padding-top:14px;border-top:1px dashed #979797;font-size:14px;text-align:center}.site-activity-tab li{width:130px;margin-bottom:18px;line-height:42px;background:#fff;text-align:center;font-size:14px;border:2px solid #7e7e7e;border-radius:2px}.site-activity-tab li a{display:block;color:#000}.site-activity-tab .current{border-radius:0;background:#000;border-color:#000}.site-activity-tab .current a{color:#fff}.show-title{line-height:98px;font-size:32px;color:#0099bb;text-align:center}.show-wrap{padding-bottom:50px}.show-wrap .layout-item{height:396px}.show-wrap .layout-item .image-box{height:308px;overflow:hidden}.show-wrap .layout-item .image-box img{width:100%;height:100%}.show-wrap .layout-item .image-box .pic-tip{display:none}.img-zoom .pic-tip{display:block;position:absolute;left:80px;top:80px;background:rgba(255,255,255,0.9);color:#009abe;text-decoration:none;height:18px;line-height:18px;padding:0 5px;border-radius:11px;font-family:'Helvetica';font-weight:bold;box-shadow:1px 2px 2px rgba(0,0,0,0.5)}.img-zoom .pic-tip:after{position:absolute;content:"";background-image:url("../images/yohood/vedio-btn.png");background-repeat:no-repeat;background-position:0 -55px;background-size:30px 310px;width:7px;height:5px;top:13px;left:-2px}.img-zoom .close-btn{position:absolute;top:6px;right:-58px;width:27px;height:27px;background-image:url("../images/yohood/close-btn.png");background-size:100% 100%}.detail-body{float:left;width:644px}.detail-title{margin:48px 0;font-size:28px}.detail-title h2,.detail-title h3{line-height:40px;font-weight:bold}.detail-slide-body{position:relative;width:100%;height:415px;overflow:hidden}.detail-slide-body .detail-slide-piclist{height:415px;overflow:hidden;position:relative}.detail-slide-body .detail-slide-piclist .box{float:left;width:644px;height:415px;line-height:415px;position:relative;background:#000;text-align:center}.detail-slide-body .detail-slide-piclist .box img{max-width:100%;vertical-align:middle}.slide-box{position:relative;margin:16px 0 0 0;visibility:hidden;overflow:hidden}.slide-box .slide-wrap{height:468px;overflow:hidden;position:relative}.slide-box .slide-wrap .box{float:left;width:100%;position:relative}.slide-box .slide-wrap .box img{display:block;width:100%}.slide-shadow a{position:absolute;width:322px;top:0;bottom:0}.slide-shadow a:focus{outline:none}.slide-shadow .slide-shadow-prev{left:0}.slide-shadow .slide-shadow-next{right:0}.detail-slide-big-ctrl a{display:none;position:absolute;font-size:40px;top:50%;color:#fff;margin-top:-30px;z-index:20}.detail-slide-big-ctrl a:focus{outline:none}.detail-slide-big-ctrl .slide-big-ctrl-prev{left:5px}.detail-slide-big-ctrl .slide-big-ctrl-next{right:5px}.detail-slide-ctrl{padding:15px 0 0 0;width:100%;height:60px;overflow:hidden;position:relative}.detail-slide-ctrl .detail-slide-ctrl-prev,.detail-slide-ctrl .detail-slide-ctrl-next{position:absolute;top:15px;width:30px;height:60px;line-height:60px;background:#e6e6e6;font-size:18px;text-align:center;color:#000}.detail-slide-ctrl .detail-slide-ctrl-prev{left:0}.detail-slide-ctrl .detail-slide-ctrl-next{right:0}.detail-slide-ctrl-tabs{position:relative;left:0;top:0}.detail-slide-ctrl-tabs li{position:relative;float:left;margin:0 0 0 8px}.detail-slide-ctrl-tabs li img{display:block;width:105px;height:60px}.detail-slide-ctrl-tabs li:first-child{margin:0}.detail-slide-ctrl-tabs li.current .border{position:absolute;left:0px;right:0px;top:0px;bottom:0px;border:2px solid #000}.detail-slide-ctrl-tabs li.current .arrow{position:absolute;top:-9px;left:50%;margin:0 0 0 -9px;width:0;height:0;border-left:9px solid transparent;border-right:9px solid transparent;border-bottom:9px solid black}.text-body{margin:25px 0;font-size:14px;line-height:28px}.text-body p{margin:25px 0}.detail-related-post h3{font-weight:bold}.detail-side{width:280px;float:right;padding-bottom:62px}.detail-ad li{margin-bottom:15px}.detail-ad li img{display:block}.app-download{width:278px;height:158px;margin-top:28px;border:1px solid #000}.app-download .qr{float:left;margin:22px 0 0 18px;width:114px;height:114px}.app-download .qr img{display:block;width:100%}.app-download .download-text{float:left;margin:20px 0 38px 12px;width:108px}.app-download .download-text img{display:block;width:50px}.app-download .download-text p{font-size:12px;color:#666}.app-download .download-text .yoho-name{font-size:18px;color:#000;font-weight:bold}.side-related-tab{border-bottom:1px solid #000}.side-related-tab a{float:left;width:140px;text-align:center;font-size:18px;line-height:38px;color:#000;font-weight:bold}.side-related-tab a.current{border-bottom:2px solid #000}.side-related-list{display:none}.side-related-list.current{display:block}.side-related-list .layout-item{float:none;margin:20px 0 0 0}.side-related-list .layout-item .image-box{float:left;width:82px;height:53px;overflow:hidden}.side-related-list .layout-item .image-box img{display:block;width:100%;height:100%}.side-related-list .layout-item .image-box .play-icon{width:20px;height:20px;margin:-10px 0 0 -10px}.side-related-list .layout-item .content{float:left;margin-left:16px;width:182px}.side-related-list .layout-item .content h2{margin:0}.side-related-list .layout-item .content h2 a{font-size:12px;font-weight:normal;line-height:20px}
... ...
... ... @@ -4,6 +4,7 @@ define('channel', function(require, exports) {
freetile = require("lib/ui/jquery.freetile"),
share = require('plugins/share');
require("plugins/pagination");
require("plugins/imgZoom");
require("plugins/slider");
function setLayout() {
... ... @@ -320,7 +321,15 @@ define('channel', function(require, exports) {
}
});
}
};
exports.siteActivity = function() {
$('.site-activity-content').find('.layout-item').each(function() {
$(this).imgZoom({
imgTag: 'pic-tip',
});
});
};
//show页面
exports.show = function() {
... ... @@ -367,5 +376,11 @@ define('channel', function(require, exports) {
$(".model").hide();
event.stopPropagation();
});
$('.show-wrap').find('.layout-item').each(function() {
$(this).imgZoom({
imgTag: 'pic-tip',
});
});
}
});
\ No newline at end of file
... ...
... ... @@ -617,6 +617,6 @@ seajs.config({
alias: {
'jquery': 'lib/jquery'
},
base: YohoConfig.resUrl + '/js/',
base: '../../res/js/',
charset: 'utf-8'
});
\ No newline at end of file
... ...
/*
* 图片放大轮播插件
* author:liuyue
* date:2015-04-23
*/
define('plugins/imgZoom', function(require, exports) {
var $ = require("jquery");
;
(function(global, undefined) {
var ImgZoom = function(element, options) {
this.$element = $(element);
this.options = options;
this.$tpl = ''; //大图存放模板
this.$overlay = ''; //黑色透明背景
this.$zoomBox = ''; //大图最外层包裹
this.imgHeight = 0; //大图高度
this.imgWidth = 0; //大图宽度
this.$btnPrev = ''; //前一张按钮
this.$btnNext = ''; //后一张按钮
this.currentClass = 'currentPhoto'; //当前图片的标识类
this.init();
};
ImgZoom.DEFAULTS = {
originalAttr: 'data-original', //图片原图存放属性
styleClass: '',
imgTag: '',
isContainer: false //杂志页需求
};
ImgZoom.prototype = {
init: function() {
this._create();
this._bindEvent();
if (this.options.isContainer) {
this.$element.find('[' + this.options.originalAttr + ']').eq(0).trigger('click.imgzoom');
}
},
/*
* 创建大图模板
*/
_create: function() {
var that = this;
if ($('.img-zoom').size() <= 0) {
this.$tpl = $('<div class="img-zoom ' + this.options.styleClass + '" onselectstart="return false" unselecttable="on">' +
'<img src="" />' +
'<a href="javascript:;" class="close-btn"></a>' +
'<a href="javascript:;" class="guide-btn prev"></a>' +
'<a href="javascript:;" class="guide-btn next"></a>' +
'</div>' +
'<div class="overlay"></div>');
$('body').append(this.$tpl);
}
this.$overlay = $('.overlay');
this.$zoomBox = $('.img-zoom');
this.$btnPrev = $('.guide-btn.prev');
this.$btnNext = $('.guide-btn.next');
},
/*
* 事件绑定
*/
_bindEvent: function() {
var that = this;
//图片点击事件
this.$element.on('click.imgzoom', '[' + this.options.originalAttr + ']', function() {
that.$element.find("." + that.currentClass).removeClass(that.currentClass);
$(this).addClass(that.currentClass);
$('.img-zoom').data('target', that);
that._photoEfficiency();
//yohood标签显示需求
that.$zoomBox.find('.' + that.options.imgTag).remove();
that.$element.find('.' + that.options.imgTag).clone().appendTo(that.$zoomBox);
});
//点击zoom外部隐藏zoom及overlay
this.$overlay.on('click', function() {
that._zoomHide();
});
this.$btnPrev.off('click');
this.$btnNext.off('click');
this.$btnPrev.on('click', function() {
_this = $('.img-zoom').data('target');
_this._photoSwitch(_this.$element.find('[' + _this.options.originalAttr + ']').index(_this.$element.find("." + _this.currentClass)), "left");
});
this.$btnNext.on("click", function() {
_this = $('.img-zoom').data('target');
_this._photoSwitch(_this.$element.find('[' + _this.options.originalAttr + ']').index(_this.$element.find("." + _this.currentClass)), "right");
});
this.$zoomBox.on('click', '.close-btn', function() {
that._zoomHide();
})
},
/*
* 图片显示效果
*/
_photoEfficiency: function() {
var that = this,
hiddenImg = $('<img src="' + this.$element.find("." + this.currentClass).attr(this.options.originalAttr) + '">').appendTo("body").css({
"position": "fixed",
'left': '-9999px',
'top': '-9999px'
});;
this._loadImg(hiddenImg.attr('src'), function() {
that.$zoomBox.find('img').remove().end().prepend(hiddenImg.removeAttr("style"));
//图片显示
that._zoomShow();
that.imgHeight = that.$zoomBox.find('img').outerHeight();
that.imgWidth = that.$zoomBox.find('img').outerWidth();
that.$zoomBox.css({
"marginTop": -that.imgHeight / 2,
"marginLeft": -that.imgWidth / 2
})
});
//检测首尾状态
this._getArrowState();
},
/*
* zoom及overlay显示
*/
_zoomShow: function() {
this.$overlay.addClass("show");
this.$zoomBox.addClass("show");
},
/*
* zoom及overlay隐藏
*/
_zoomHide: function() {
this.$overlay.removeClass("show");
this.$zoomBox.removeClass("show");
},
/*
* 检测首尾状态
*/
_getArrowState: function() {
if (this.$element.find('[' + this.options.originalAttr + ']').index(this.$element.find("." + this.currentClass)) == 0) {
this.$btnPrev.hide();
} else {
this.$btnPrev.show();
}
if (this.$element.find('[' + this.options.originalAttr + ']').index(this.$element.find("." + this.currentClass)) == this.$element.find('[' + this.options.originalAttr + ']').size() - 1) {
this.$btnNext.hide();
} else {
this.$btnNext.show();
}
},
/*
* 图片左右切换
* @param: index为当前图片索引,direction为切换方向
*/
_photoSwitch: function(index, direction) {
var _index;
this.$element.find('.' + this.currentClass).removeClass(this.currentClass);
if (direction === 'left') {
_index = index - 1;
} else {
_index = index + 1;
}
this.$element.find('[' + this.options.originalAttr + ']:eq(' + _index + ')').addClass(this.currentClass);
this._photoEfficiency();
},
/*
* 图片load
* @param: src为要load的图片src
*/
_loadImg: function(src, callback) {
var img = new Image();
if ($.browser.msie) {
obj.onreadystatechange = function() {
if (this.readyState == "complete") {
callback.call(img); //将回调函数的this替换为Image对象
img = null;
}
}
} else {
img.onload = function() { //图片下载完毕时异步调用callback函数。
callback.call(img); //将回调函数的this替换为Image对象
img = null;
};
}
img.src = src;
}
}
function Plugin(option, _relatedTarget) {
return this.each(function() {
var $this = $(this);
var data = $this.data('yoho.imgZoom');
var options = $.extend({}, ImgZoom.DEFAULTS, $this.data(), typeof option == 'object' && option);
// 如果没有初始化,则初始化该对象,并且把该对象绑定到此元素的yoho.PicSilder属性下。
if (!data) $this.data('yoho.imgZoom', (data = new ImgZoom(this, options)));
// 如果传递的options是一个字符串,则表示调用改对象的原型方法。
if (typeof option == 'string') data[option](_relatedTarget);
});
};
$.fn.imgZoom = Plugin;
$.fn.imgZoom.Constructor = ImgZoom;
})(this);
});
\ No newline at end of file
... ...
... ... @@ -114,7 +114,6 @@ seajs.use('yohood',function(yohood){
</script>
<?php $this->_block('js');?>
<?php $this->_endblock();?>
<div class="overlay"></div>
</body>
</html>
 
\ No newline at end of file
... ...
... ... @@ -36,6 +36,7 @@
<div id="brand_detail">
</div>
<div class="overlay"></div>
<?php $this->_endblock();?>
<?php $this->_block('js');?>
<script type="text/javascript">
... ...