簡體   English   中英

如何創建產品圖片滑塊?

[英]How to create a product images slider?

我想創建一個類似於 dicksmith 產品頁面中的產品滑塊( http://www.dicksmith.com.au/razer-deathadder-ergonomic-gaming-mouse-dsau-yg10178在此處輸入圖片說明

布局應該是相似的,圖像是從數據庫中讀取的。 有人有示例源代碼嗎? 或者給我一個建議(使用 jQuery、ajax 或 CSS 都可以)。 謝謝

        var $slider = $('.product-img-box').find('.Zoom-Box');
        if( $slider.length > 0 ) {
            $slider.carouFredSel({
                auto                : false,
                circular            : true,
                responsive          : true,
                scroll: {
                    fx : "crossfade",
                    easing : "linear",
                    // pauseOnHover    : true,
                    duration        : 1000,
                },
                swipe: {
                    onMouse         : true,
                    onTouch         : true
                },
                next: {
                    button          : '.right-nav',
                    key             : 'right'
                },
                prev: {
                    button          : '.left-nav',
                    key             : 'left'
                },
            }, {
                wrapper: {
                    classname       : 'Zoom-Box-wrapper',
                }
            });
        }

應該使用插件吧..你可以先下載插件。 網址: https : //github.com/gilbitron/carouFredSel

檢查此鏈接它使用 Fancybox在此處輸入鏈接描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM