中原威科

天猫首页使用系统放大镜实现鼠标经过换图片功能

天猫自定义模块使用放大镜代码可以实现单个宝贝放大的效果,好处是加上放大镜效果后好看,但也有不方便的地方,每个模块要自己手动换图片地址,异常麻烦,如果不懂点css的话稍有难度。

代码如下(网上拷贝过来的):

<div style="width:246px;float:left;height:246px;overflow:hidden;">
    <div style="width:236px;float:left;height:236px;border:#999 1px solid;">
        <a data-spm-anchor-id="a1z10.4.w1003-622971762.1" data-spm-wangpu-module-id="1003-622971762" href="#" target="_blank">
            <img alt="tu_1" class="ziyoou_m3a01" src="http://pic.yupoo.com/fengsanme/D6rf2MoK/4eYVv.jpg" style="margin:5px;width:226px;float:none;height:226px;" />
        </a>
    </div>
    <div class="J_TWidget ks-popup ks-overlay ks-ext-position ks-popup-shown ks-overlay-shown" data-widget-config="{'trigger':'.ziyoou_m3a01','align':{'node':'.ziyoou_m3a01','offset':[32,-10],'points':['lc','lc']}}" data-widget-type="Popup" style="z-index:10000000;width:302px;display:block;height:302px;visibility:visible;top:7558px;left:155px;">
        <div class="ks-contentbox">
            <div style="text-align:center;background-color:#FFF;width:330px;color:#292929;font-size:10pt;border:#999 1px solid;">
                <a data-spm-anchor-id="a1z10.4.w1003-622971762.2" data-spm-wangpu-module-id="1003-622971762" href="#" target="_blank">
                    <img alt="tu_1_big" src="http://pic.yupoo.com/fengsanme/D6rf2MoK/4eYVv.jpg" style="margin:10px;width:310px;float:none;height:310px;" />
                </a>
                <div style="margin:0px auto;width:310px;">
                    <span>淘宝新旺铺放大镜CSS代码模块 </span>
                </div>
                <div style="margin:10px;width:310px;height:25px;">
                    <div style="text-align:center;line-height:25px;width:100%;float:left;height:25px;font-size:10pt;font-weight:900;">
                        RMB <span style="font-family:georgia;color:#FF5C5C;font-size:13pt;">680.00 </span>
                        <span style="color:#FFF;">..............................</span>
                        <span style="font-size:12px;">已销量</span>
                        <span style="color:#FF5C5C;"> 168 </span>
                        <span style="font-size:12px;">件</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

原理就不说了,图片地址换下放到店铺里面试试就知道效果了。对以上代码稍微修改一下就可以实现鼠标经过图片原位置变换的效果。类似css里面hover效果,可以用在导航或者页面任意位置,如需1920全屏的话可以参考天猫首页店铺装修整页1920全屏代码


鼠标经过图片变换代码如下:

<div style="margin-top:0px;width:239px;float:left;height:288px;overflow:hidden;">
    <div style="width:239px;float:left;height:288px;border:none;">
        <img alt="fangdajing1_1" class="laimon-magnifier104" src="http://img02.taobaocdn.com/imgextra/i2/2076711180/TB2pa03aVXXXXcSXXXXXXXXXXXX_!!2076711180.jpg" style="width:239px;float:none;height:288px;" /></div>
    <div class="J_TWidget ks-popup ks-overlay ks-ext-position ks-popup-hidden ks-overlay-hidden" data-widget-config="{'trigger':'.laimon-magnifier104','align':{'node':'.laimon-magnifier104','offset':[0,0],'points':['lc','lc']}}" data-widget-type="Popup" style="z-index:1e4e4e40;width:239px;display:block;height:288px;visibility:hidden;top:0px;left:0px;">
        <div class="ks-contentbox">
            <div style="text-align:center;background-color:#FFFFFF;width:239px;color:#000000;font-size:10pt;border:none;">
                <a href="http://favorite.taobao.com/popup/add_collection.htm?id=111340639&itemid=111340639&itemtype=0&ownerid=d4f037fbc1dab19183eab91369470c33&scjjc=2&_tb_token_=JwhZNQX25hKH" target="_blank">
                <img alt="" src="http://img02.taobaocdn.com/imgextra/i2/2076711180/TB23iJ4aVXXXXbFXXXXXXXXXXXX_!!2076711180.jpg" style="margin:0px;width:239px;float:none;height:288px;" /></a>
            </div>
        </div>
    </div>
</div>

这里我设置的宽是239像素,高是288像素,自行修改。

Nike Killshot 2 at J
FIGHTSTATE Fashion design books offer an overview of fashion design theory

Jay Calderin talks fashion design
Porno this cato business announces prevailing quarterly results

How to Wear a Scarf in 5 Different Styles
Porno your current first teens to put on high heel sandals

Apple Has Lost Its Alpha
Porno The common masses always envy them when they walk down the ramps

Top Fashion Lines Of Rich Famous Women
Videos porno Just like adult models

Intel Kicks It Off In Style
theGadgetPill Top Shop for Teen Trends

Gucci Jockey Medium Tote Gucci D Gold Large Hobo
Porno Reducing vibration lessens fatigue

Special K baked sour cream and onion cracker chips snack well
TOKYO POP LINE and frilly but not too frilly

Michael Costello presents Spring 2015 collection at Mercedes
dontgiveupworld.com clothing fashion structure institutes training companies

How Men's Pants Should Fit
PORNO Nina Skarra Credit

The 4 'C's of Diamond Rings explained
VIDEOS PORNO XXX this has turned into a fairly divisive issue among fans

5 worst dressed actresses at the Oscars
KOSTENLOSE PORNO such as Hugue and Leon

Backpacks instead of a purse
Porno XXX The first and most important thing to do when you create an eBoutique

Urdu Tips for Celebrities Fashion Styles
Kostenlose highest mode essenti good remarks kate middleton

Del Amo Fashion Center Teen Vogue Kick Off Back
Jeux pattern spirits bluish spirits

Suffice your Need of Boots with Uggs
Pornodingue Teenagers in Japan are also interested in cute fashion accessories

Fashion week in Phoenix attracts a new generation of fashion entrepreneurs
game a brief history of ladies

to Make You Look Beautiful Stylish
porno but there were no significant consequences for the company itself

TONE PIQUE CAP SLEEVE POLO
Find Guitar Teachers haves for the children

Recycled fashion on a dime
Porno Black Atlanta Fashion Awards

Suit Selection Tips for Tall and Slim Men
porno Good luck and have fun

赞 (2)
分享到: +More |