jquery瀑布流网页布局插件_图片带阴影效果的瀑布流效果代码3470
相关jquery代码
$(window).load( function() {
		$('#container').BlocksIt({
			numOfCol: 5,
			offsetX: 8,
			offsetY: 8,
			blockElement: '.grid'
		});
	});

	//window resize
	var currentWidth = 1100;
	$(window).resize(function() {
		var winWidth = $(window).width();
		var conWidth;
		if(winWidth < 440) {
			conWidth = 220;
			col = 1
		}
        else if(winWidth < 660) {
            conWidth = 440;
            col = 2
        }
        else if(winWidth < 880) {
			conWidth = 660;
			col = 3
		}
        else if(winWidth < 1100) {
			conWidth = 880;
			col = 4;
		}
        else if(winWidth < 1320) {
            conWidth = 1100;
            col = 5;
        }
        else {
			conWidth = 1320;
			col = 6;
		}


		if(conWidth != currentWidth) {
			currentWidth = conWidth;
			$('#container').width(conWidth);
			$('#container').BlocksIt({
				numOfCol: col,
				offsetX: 8,
				offsetY: 8
			});
		}
	});

      立即下载 ( 文件大小:0.21 M)

    浏览器兼容性

    1. IE 8
    2. IE 9
    3. Mozilla Firefox
    4. Google Chrome
    5. Oper
    6. Safari

    技术讨论区

    1. 请先登录

        发 布

    键盘快捷键: 上一个 下一个