首页 > jQ.animate方法,为什么设置speed,无效果呢?

jQ.animate方法,为什么设置speed,无效果呢?

如果设置把speed 设置为“slow"or"fast",就有效 如下:

<script> 
$(document).ready(function(){
  $("button").click(function(){
    $("div").animate({left:'250px'},"slow");
  });
});
</script> 

但如果设置为"200000ms"就无效,语法是允许毫秒啊~~ 如下:

<script> $(document).ready(function(){ $("button").click(function(){ $("div").animate({left:'250px'},"200000ms"); }); }); </script>


把单位去掉就好了,应该是Int型的参数

【热门文章】
【热门文章】