Why do I have rotation animation here, if there is no animation effect in Synchronize writing, it is only possible to write it asynchronously?

//  
    // id 
    function Slider (id) {
        this.create(id)
    };
    //
    Slider.prototype = {
        create: function (id) {
            this.container = document.getElementById(id);
            this.list = document.getElementById("list");
            this.buttons = document.getElementById("buttons").getElementsByTagName("span");
            this.prev = document.getElementById("prev");
            this.next = document.getElementById("next");
            this.index = 1;   //
            this.swapPageTime = 2000
            this.timer=null;
        },
        animate: function (offset,animateDuration) {
            //style.leftstyle.left
            //style.leftparseInt()
            this.list.style.transition = `left ${animateDuration} linear`;//
            var newLeft = parseInt(this.list.style.left) + offset;
            this.list.style.left = newLeft + "px";  //
        },
    };
    var slider = new Slider("container");
    setTimeout(function () {
        slider.animate(-300,"1s")
    },0)  //
    //    slider.animate(-300,"1s") 
    
    



animatelistleft,transition

Synchronize js code, if the code between the beginning and the end of the animation cannot cause the browser to animate, the settings behind the reflow, animation will overwrite the previous settings, and the animation will not occur
solution 1.settimeout = = > asynchronism leads to rearrangement
solution 2. Var slider = new Slider ('container');
slider.list.offsetWidth = = > artificial Synchronize rearrangement
slider.animate (- 300 < 1s')

Menu