<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>IntersectionObserver</title>
</head>
<style>
.container {
margin: 40px auto;
text-align: center;
}
img {
height: 200px;
width: 300px;
}
</style>
<body>
<div class="container">
</div>
<script>
const containerDom = document.querySelector('.container');
function addImgs() {
let img = document.createElement('img');
img.setAttribute('src', './imgs/1.jpeg');
containerDom.appendChild(img);
window.requestAnimationFrame(addImgs)
}
addImgs()
</script>
</body>
</html>