小编Far*_*Boy的帖子

jQuery animate({left:"+ = 10"})无效

<script type="text/javascript" src="./Scripts/jquery-1.5.1.min.js"></script>
<script type='text/javascript' >
    $(document).ready(function () {
        $("#start").animate({ left: "+=10px" }, 1000)
            .animate({ left: "-5000px" }, 1000);
    });
</script>

<p id="start">this is some text that i am going to animate </p>
Run Code Online (Sandbox Code Playgroud)

我在这里绞尽脑汁为什么这不起作用.如果我改变leftmarginLeft它会按预期和动画.但我不知道为什么left不.

有人可以解释一下吗?我见过许多其他脚本做类似的事情.

jquery jquery-animate

2
推荐指数
1
解决办法
7366
查看次数

标签 统计

jquery ×1

jquery-animate ×1