<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.anlition {
width: 1000px;
margin: auto;
border: 1pa solid red;
}
.anli {
width: 100%;
margin: 25px 0;
display: flex;
justify-content: space-between;
}
.ok {
width: 200px;
height: 300px;
background-color: rgb(178, 212, 178);
}
</style>
</head>
<body>
<div class="anlition">
<div class="anli">
<div class="ok"></div>
<div class="ok"></div>
<div class="ok"></div>
<div class="ok"></div>
</div>
<div class="anli">
<div class="ok"></div>
<div class="ok"></div>
<div class="ok"></div>
<div class="ok"></div>
</div>
<div class="anli">
<div class="ok"></div>
<div class="ok"></div>
<div class="ok"></div>
<div class="ok"></div>
</div>
</div>
<script>
function over() {
let timer = null;
return function () {
if (timer == null) {
timer = setTimeout(() => {
let div = document.createElement('div');
div.setAttribute('class','anli');
div.innerHTML=`<div class="ok"></div>
<div class="ok"></div>
<div class="ok"></div>
<div class="ok"></div>`
document.querySelector('.anlition').appendChild(div);
timer = null;
}, 350)
}
}
}
window.onscroll = over();
</script>
</body>
</html>