2

As you may see below I have used video as to show as my pr eloader screen but this doesn't display anything.

HTML code -

<div class="loader-wrapper">
      <video autoplay loop muted plays-inline>
        <source src="/HotelWebsite/src/assets/video/Stripes.mp4" type="video/mp4">
      </video>
    </div>
    <script>
      $(window).on("load",function(){
        $(".loader-wrapper").fadeOut("slow");
      });
    </script>

CSS Code -

    width: 100%;
    height: 110%;
    position: absolute;
    top: 0;
    left: 0;
    /* justify-content: center; */
    /* background: coral; */
}

I tried this but didn't work

Dev.loads
  • 21
  • 1
  • CSS has no selector and the jQuery fadesOut the video when the page loads? Did you just want the audio playing in the background? You'd actually see the video by removing the jQuery all together. – zer00ne May 30 '22 at 14:48
  • try: – Anwar S. May 30 '22 at 14:54
  • also I think you might want to use : position: fixed because if the page content it's bigger then 100% window size you'll be able still to scroll down the page. and height: 100vh – Anwar S. May 30 '22 at 14:57
  • Might be something to do with this: https://stackoverflow.com/questions/3698200/window-onload-vs-document-ready – Nicolas Goosen May 30 '22 at 15:18

0 Answers0