柳暗花明笔记

    fancybox 真的是个好东西啊,手机优先

    所属分类:[ php&web ] 猫哲学家 发表于:2017-03-17 10:53 浏览:212

     举个例子

    var jumpto = 0, //Change to load non zeroth Image
    data = [
    {
    "href": "http://farm2.staticflickr.com/1019/3174174579_e2620a6c75_o.jpg",
    "title": "Kongen og Dronningen, Bispen, Norway",
    "thumbnail": "http://farm2.staticflickr.com/1019/3174174579_0c6a63ca70_s.jpg"
    },
    {
    "href": "http://farm9.staticflickr.com/8029/8067360578_1c86b97745_b.jpg",
    "title": "Make my dream come true...",
    "thumbnail": "http://farm9.staticflickr.com/8029/8067360578_1c86b97745_s.jpg"
    },
    {
    "href": "http://farm8.staticflickr.com/7134/7104102841_377648a7bb_b.jpg",
    "title": "Twilight",
    "thumbnail": "http://farm8.staticflickr.com/7134/7104102841_377648a7bb_s.jpg"
    }
    ];

    $.fancybox.open(data, {
    index: jumpto,
    padding: 10,
    transitionIn: 'none',
    transitionOut: 'none',
    type: 'image',
    changeFade: 0,
    mouseWheel: true,
    helpers: {
    overlay: {
    closeClick: false,
    speedOut: 200,
    showEarly: true,
    css: {},
    locked: true
    },
    title: {
    type: 'float' // 'float', 'inside', 'outside' or 'over'
    },
    thumbs: {
    width: 50,
    height: 50,
    source: function (image) {
    return image.thumbnail;
    },
    position: 'bottom' //'top', 'bottom'
    }
    }
    });

    标签: jQuery  javascript 
    上一编文章 网站响应时间测试httping 下一编文章 Prestashop的PayPal的标准支付和EC支付的过程
    最近文章
    发表评论