报错cannot read properties of null
将.banner跟ul写在一起试一下?var ul = document.querySelector(".banner ul")
你打印一下banner ,好像是你没有获取到banner 这个class