【问题标题】:Google images gray box popup look'n'feel with js谷歌图像灰色框弹出看起来'n'feel with js
【发布时间】:2013-02-28 07:39:18
【问题描述】:

在谷歌图片搜索中实现灰色框滑出效果的最有效方法是什么?我目前有所需的设计。在 4 列中有一组图像,单击图像时会滑出一个框。但是,我不知道如何让它在正确的位置(点击的图像下方)弹出。

Google 图片搜索示例:http://bit.ly/YBe7ay 我需要实现的链接:http://fxtouch.ee/projects/scale/

【问题讨论】:

    标签: javascript jquery google-image-search dynamic-html


    【解决方案1】:

    听起来我们正在执行类似的任务。这是一个你可能想看看的插件http://www.htmldrive.net/items/show/1036/JQuery-Ajax-Cool-Shopping-cart-effect

    在第 44 行的某处,代码将带有相应文本的“框”直接放在单击的缩略图行的下方。

    $('#cart_wrapper .cart-info').append('<div class="shopp" id="each-'+thisID+'"><div class="label">'+itemname+'</div><div class="shopp-price"> $<em>'+itemprice+'</em></div><span class="shopp-quantity">1</span><img src="remove.png" class="remove" /><br class="all" /></div>');
    

    然后再次在第 110 行的某个地方,代码将“框”放在定义的 div 中

    $("html:not(:animated),body:not(:animated)").animate({scrollTop: targetOffset}, 800,function(){
       $('#wrap #detail-'+thisID).slideDown(500);
        return false;
    });
    

    浏览文件并查看它们是如何组合在一起的,然后将其与您的界面集成。

    【讨论】:

    • 代码行可能不准确,因为我指的是我的代码版本,而我的代码已损坏(由于自身原因)。但至于代码,它仍然是原始的。
    • 这很有帮助。谢谢!
    猜你喜欢
    • 2019-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多