""http://www.yawer.net/test-portofolio/" rel="no follow" >这个 是我的示例代码:
当我点击任何过滤器链接时,布局会被打破 。
我使用 isotope
插件,这是我的jquery 代码。
<强度 > JSS 强度 > 标记 :
$(function(){
$( .fancygallery-panel ).wrapAll( <div id="isotopeCont" /> );
$( #filters a ).click(function(){
var selector = $(this).attr( data-filter );
$( #isotopeCont ).isotope({
filter: selector ,
animationEngine: best-available
});
return false;
});
})
<强度 > CSS 强度 > 标记 :
/**** Isotope filtering ****/
.isotope-item {
z-index: 2;
}
.isotope-hidden.isotope-item {
pointer-events: none;
z-index: 1;
}
.isotope,
.isotope .isotope-item {
/* change duration value to whatever you like */
-webkit-transition-duration: 0.8s;
-moz-transition-duration: 0.8s;
-ms-transition-duration: 0.8s;
-o-transition-duration: 0.8s;
transition-duration: 0.8s;
}
.isotope {
-webkit-transition-property: height, width;
-moz-transition-property: height, width;
-ms-transition-property: height, width;
-o-transition-property: height, width;
transition-property: height, width;
}
.isotope .isotope-item {
-webkit-transition-property: -webkit-transform, opacity;
-moz-transition-property: -moz-transform, opacity;
-ms-transition-property: -ms-transform, opacity;
-o-transition-property: top, left, opacity;
transition-property: transform, opacity;
}
/**** disabling Isotope CSS3 transitions ****/
.isotope.no-transition,
.isotope.no-transition .isotope-item,
.isotope .isotope-item.no-transition {
-webkit-transition-duration: 0s;
-moz-transition-duration: 0s;
-ms-transition-duration: 0s;
-o-transition-duration: 0s;
transition-duration: 0s;
}