let doc = document.getElementById("root"); console.log(doc.scrollWidth); doc.scrollLeft = doc.scrollWidth;
这句话 用了之后没起作用。