V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ericgui
V2EX  ›  PHP

能否帮忙看看这个网站用到了哪个轮子?谢谢

  •  
  •   ericgui · 2016-12-16 20:02:39 +08:00 · 2336 次点击
    这是一个创建于 2705 天前的主题,其中的信息可能已经有所发展或是发生改变。
    http://www.zimuzu.tv/
    这个网站往下拉有个“热门话题”,就是不断滚动最新的评论。
    哪位能帮忙看一下这个是用什么做出来的效果?

    我搜到有类似的 js 组件,叫 vTicker http://richhollis.github.io/vticker/
    看着挺好的,准备试试。
    但不知道这个网站用的是不是也是 vTicker 。
    5 条回复    2016-12-20 13:14:01 +08:00
    clijiac
        1
    clijiac  
       2016-12-17 09:55:21 +08:00
    无聊看了下 在这个 js 里面 http://js.rrsub.net/js/global.js?v=20160922

    GLOBAL.JQUERY.Scroll({obj:$('#commentList')});

    ```js
    GLOBAL.JQUERY.Scroll = function(a) {
    var b = {
    obj: {},
    time: 500
    };
    b = $.extend(b, a);
    _obj = b.obj;
    if (_obj.outerHeight() <= _obj.parent().outerHeight()) {
    return
    }
    _obj.wrap("<div></div>");
    _parent = _obj.parent();
    _parent.data("time", b.time);
    b.parent = _parent;
    scroll_create = function() {
    b.parent.css("marginTop", 0).children().eq(1).remove();
    $copy = b.parent.children().first().clone();
    $copy.prependTo(b.parent);
    b.parent.css("marginTop", "-" + $copy.outerHeight() + "px");
    b.order = 1
    }
    ;
    scroll_autoStart = function(c) {
    timer = setInterval(function() {
    _obj = c.children().eq(0);
    _size = _obj.children().size();
    _order = b.order;
    c.animate({
    marginTop: "+=" + _obj.children().eq(_size - _order).outerHeight() + "px"
    }, c.data("time"), function() {
    _order = b.order;
    if (_order == b.parent.children().eq(0).children().size()) {
    scroll_create(b.parent)
    } else {
    b.order = _order + 1
    }
    })
    }, 3000);
    b.parent.data("timer", timer)
    }
    ;
    scroll_autoStop = function(c) {
    clearTimeout(c.data("timer"))
    }
    ;
    _parent.bind("mouseover", function() {
    scroll_autoStop(b.parent)
    }).bind("mouseout", function() {
    scroll_autoStart(b.parent)
    });
    scroll_create(b.parent);
    scroll_autoStart(b.parent)
    }
    ```
    aixiaoge
        2
    aixiaoge  
       2016-12-17 11:35:45 +08:00
    chrome 有个扩展, BuiltWith Technology Profiler
    Find out what the website you are visiting is built with using this extension.
    ericgui
        3
    ericgui  
    OP
       2016-12-17 19:29:25 +08:00
    @clijiac 意思说,他们自己写的一个小组件?
    ericgui
        4
    ericgui  
    OP
       2016-12-17 19:29:34 +08:00
    @aixiaoge 好的,我试试,谢谢
    cevincheung
        5
    cevincheung  
       2016-12-20 13:14:01 +08:00
    不是最新的吧。永远都是那几个来回轮
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2689 人在线   最高记录 6547   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 15:53 · PVG 23:53 · LAX 08:53 · JFK 11:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.