<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
</head>
<body>
    <div class="container"></div>
    
    <script>
        let container = document.getElementsByClassName("container")[0];

        setTimeout(function(){
            container.style.height = "400px";
            let img = new Image();
            img.src = "./img/wy.jpg";
            img.style.height = "100%";
            img.style.objectFit = "cover";
            container.appendChild(img);
        },3000)
       
    </script>
</body>
</html>

 

相关文章:

  • 2021-12-27
  • 2021-11-11
  • 2021-10-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-20
  • 2021-11-14
  • 2021-05-31
  • 2021-08-13
  • 2022-01-18
相关资源
相似解决方案