【发布时间】:2014-04-08 22:40:01
【问题描述】:
我有以下 javascript 代码,可以为图像上的叠加层设置动画。
我怎样才能使效果只是滑动,而不是围绕 X 旋转?
jQuery(".portfolio-item .portfolio-media-wrapper.gdl-image").hover(function(){
if (jQuery.support.transition){
jQuery(this).children('a.hover-wrapper').transition({ opacity: 0, rotateX: '180deg', duration: 0});
jQuery(this).children('a.hover-wrapper').transition({ opacity: 1, rotateX: '0deg' });
}else{
jQuery(this).children('a.hover-wrapper').animate({ opacity: 1 });
}
}, function(){
if (jQuery.support.transition){
jQuery(this).children('a.hover-wrapper').transition({ opacity: 0, rotateX: '180deg' });
}else{
jQuery(this).children('a.hover-wrapper').animate({ opacity: 0 });
}
});
【问题讨论】:
标签: javascript jquery transform