// js随机生成流星 for (var j = 0; j < 20; j++) { var newstar = document.createelement("div") newstar.classname = "star" newstar.style.top = randomdistance(500, -100) + 'px' newstar.style.left = randomdistance(1980, 300) + 'px' stars.appendchild(newstar) }可改变j增加或减少生成的数量