这是我面临的问题 - 它有时只出现: 这是我的输出图像:
我需要和Pintrest风格一样。
代码:
$(document).ready(function(){
var $container = $('#content');
$container.isotope({
filter: '*',
//layoutMode : '',
animationOptions: {
duration: 750,
easing: 'linear',
queue: false,
}
});
$('#nav a').click(function(){
var selector = $(this).attr('data-filter');
$container.isotope({
filter: selector,
animationOptions: {
duration: 750,
easing: 'linear',
queue: false,
}
});
return false;
});
});
解决: 问题解决了:))
答案 0 :(得分:2)
我已在您的网站上测试过,这是您的答案:
$('#content').isotope({
itemSelector:'.isotope-item',
layoutMode: 'fitRows'
});
将layoutMode更改为此处提供的其他值:http://isotope.metafizzy.co/docs/layout-modes.html
你的标题JS应该是这样的:
<script type="text/javascript">
$( document ).ready( function() { // Here you listen for the document ready event, when html, css, js are ready
$( '#part1' ).load("home/" , function(){ $('#loading').remove();});
});
//hide frame on resizing the window
$(window).bind('resize load', function(){ // here you listen for resize and load of images, iframes and others
if ($(window).width() < 1349) {
$('#frame').hide();
$('#right').css('width' , '85%');
}
else {
$('#frame').show();
$('#right').css('width' , '72%');
}
});
</script>