gpt4 book ai didi

javascript - 如何同时向两个方向制作 div 动画?

转载 作者:行者123 更新时间:2023-12-01 01:47:14 24 4
gpt4 key购买 nike

我需要同时在两个方向上为这个 div 制作动画,但它只为第一个属性制作动画。

function  plan11() {   
$('.plan1').animate({ left : windowWidth, top: '10px;'},60000, "linear", function() {
$('.plan1').delay(1000).animate({ left: "-83" },30000,"linear"); medium() ; }); }
plan11();

我怎样才能实现这个目标?

最佳答案

您应该删除 ;在“顶部”属性中:

function plan11() { 
$('.plan1').animate({ left : windowWidth, top: '10px'}, 60000, "linear",
function() {
$('.plan1').delay(1000).animate({ left: "-83" }, 30000, "linear");
medium();
});
}

plan11();

关于javascript - 如何同时向两个方向制作 div 动画?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20299614/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com