JavaScript ile Galeri Oluşturma

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
   
   <style>
       @keyframes gorunur_efecti {
    from {
        transform: scale(1);
        opacity: 0.2;
    }

    to {
        transform: scale(1.2);
        opacity: 1;
    }
}

body {
    background-color: darkslateblue;
}

.resim_style {
    width: 100px;
    height: 100px;
    margin: 10px;
    border: 5px solid white;
    filter: grayscale(100%);
}

.resim_style:hover {
    filter: grayscale(0%);
    animation-name: gorunur_efecti;
    animation-duration: 3s;
}

   </style>
</head>
<script>
    function resimler_gelsin(resim_sayisi) {
    for (var i = 1; i <= resim_sayisi; i++) {
        resim = document.createElement("img");
        resim.src = "images/resim" + i + ".jpg";
        resim.className = "resim_style";
        document.body.appendChild(resim);
    }
}
</script>

<body onload="resimler_gelsin(142)">
</body>

</html>