是否有任何解决方案可以在过渡和不过渡的情况下使用相同的操作?
css
-webkit-transition: all 0.5s ease 0s;
-moz-transition: all 0.5s ease 0s;
-ms-transition: all 0.5s ease 0s;
-o-transition: all 0.5s ease 0s;
transition: all 0.5s ease 0s;
jQuery
$("#transition").click(function(){
$("#box-progress").css("left", "50%");
});
// This shoudn't show transition;
$("#no-transition").click(function(){
$("#box-progress").css("left", "50%");
});