在我的动画之后,我失去了这些 CSS 样式。有没有办法可以使用 .()append 之类的东西将它们添加回来?并不是$(this).removeAttr('style');
.grid li a:hover img {
-webkit-transition: opacity .3s ease-in;
-moz-transition: opactiy .3s ease-in;
-ms-transition: opacity .3s ease-in;
-o-transition: opacity .3s ease-in;
transition: opacity .3s ease-in;
opacity: 1;
}
.grid:hover li {
-webkit-transition: opacity .3s ease-in;
-moz-transition: opactiy .3s ease-in;
-ms-transition: opacity .3s ease-in;
-o-transition: opacity .3s ease-in;
transition: opacity .3s ease-in;
zoom: 1;
filter: alpha(opacity=1);
opacity: 0.3;
}
这是执行动画的代码
$('#container img').addClass("img_org");
$(this).siblings().css("top", "0px");
$(this).siblings().stop();
$(this).parent().detach();
$('.pop_title').css({ "margin-left": "25%", "margin-right": "25%", top: "100px", left: "0", "font-size": "200%"});
$('#container').css({ left: image.left, top: image.top, opacity: 1})
.animate({marginLeft: '25%',marginRight: '25%', top: '150', left: '0'},200,'easeInCubic', function(){
$('.nextButton, .prevButton, .zoom_back, .zoom_big, .info, .box_counter ').animate({opacity: 1},500);
$('.pop_title').css("font-size", "200%").text(content.navgrid[2][location].title);
});
$('#container ul, #container').css({height: "422px",width: "679px"});