V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
top1ofshu
V2EX  ›  问与答

JS 问题:向大家请教一个香奈尔的网站页面效果,代码里找了好久,不知道怎么下手

  •  
  •   top1ofshu · Jul 29, 2014 · 2914 views
    This topic created in 4301 days ago, the information mentioned may be changed or developed.
    http://www.chanel.com/en_WW/fashion.html
    老板叫我做个一样的效果出来.
    现在已知是基于Sencha,ExtJS的,问一下各位知道这种随鼠标移动的效果有名字吗?是Sencha自带的还是别的第三方库?
    4 replies    2014-07-29 14:03:45 +08:00
    abelyao
        1
    abelyao  
       Jul 29, 2014
    时间不急的话用 jQuery 自己写一样也不难吧
    j
        2
    j  
       Jul 29, 2014
    打开 http://www.chanel.com/etc/designs/chanel/ifashion/common.js

    你可以看到他们使用了 hammer.js(A javascript library for multi-touch gestures)
    https://github.com/hammerjs/hammer.js

    你看到的效果是hammer.js的简单实例,可参考github上提供的文档。
    learnshare
        3
    learnshare  
       Jul 29, 2014
    应该属于视差滚动的应用,结合了 mousemove 事件。如果需要触摸移动,再结合 touchmove 事件就可以了。
    top1ofshu
        4
    top1ofshu  
    OP
       Jul 29, 2014
    @abelyao 大神,既然说不难了,说一下思路咯?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   977 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 22:19 · PVG 06:19 · LAX 15:19 · JFK 18:19
    ♥ Do have faith in what you're doing.