我正在尝试使用布局pinterest但不成功:
用法:
var wall = new freewall("#pinterest");
wall.reset({
selector: '.pin',
cellW: 200,
cellH: 'auto',
onResize: function() { return wall.fitWidth(); }
});
return wall.container.find('.pin img').load(function() {
return wall.fitWidth();
});
答案 0 :(得分:0)
Dont change the selector class as .pin keep this .brick
<script type="text/javascript">
var wall = new freewall("#pinterest");
wall.reset({
selector: '.brick',
cellW: 200,
cellH: 'auto',
onResize: function() {
wall.fitWidth();
}
});
wall.container.find('.brick img').load(function() {
wall.fitWidth();
});
</script>
For refrence check this link http://vnjs.net/www/project/freewall/example/pinterest-layout.html