可能是因为txt2imgSettings元素不存在或者不可见,导致scrollIntoView方法不起作用。你可以在调用scrollIntoView方法前,先检查一下txt2imgSettings元素是否存在,是否可见。如果不存在或者不可见,可以考虑使用其他方式实现滚动,比如scrollTop属性。

为什么我这里的scrollIntoView behavior smooth 都不起作用?是被限制了?还是有别的办法?function clicktxt2img var button1Skip = documentbodyquerySelector#txt2img_skip; var button1Skip = gradioAppquerySelector#txt2

原文地址: https://www.cveoy.top/t/topic/fsgh 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录