-3

これは私が直面している問題です-時々しか発生しません:問題 これは私の出力画像です:

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;
});

});

解決済み: 問題が解決しました:)

4

1 に答える 1

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>
于 2012-09-29T09:17:57.727 に答える