1

I'm doing intro "Merry Christmas" video and I want to use HTML. https://cleoni.pl/

  1. Chrome - didn't work
  2. Firerfox - it works/didn't work
  3. Opera - it works
  4. Microsoft Edge - it works

    #home-bg-video {
        position: fixed;
        top: 50%;
        left: 50%;
        -webkit-transform: translateX(-50%) translateY(-50%);
        transform: translateX(-50%) translateY(-50%);
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
        z-index: -1;
     background: #000000;
        background-size: cover;
    }
<video id="home-bg-video" poster="../video/CHoinka_AR_001_cam_002.jpg" autoplay>
          <source src="../video/2019_choinka_dzwonki_77.mp4" type="video/mp4">
          <source src="../video/2019_choinka_dzwonki_77.webm" type="video/webm"> 
        </video>
Dharman
  • 30,962
  • 25
  • 85
  • 135

1 Answers1

2

Is this the effect you are looking for?

#home-bg-video {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    background: #000000;
    background-size: cover;
    animation: mymove 2s;
    -webkit-animation: mymove 2s;
}



/* Safari 4.0 - 8.0 */
@-webkit-keyframes mymove {
  from {
     -webkit-transform: translateX(50%) translateY(50%);
    transform: translateX(50%) translateY(50%);
  }
  to {
     -webkit-transform: translateX(0%) translateY(0%);
    transform: translateX(0%) translateY(0%);
  }
}

/* Standard syntax */
@keyframes mymove {
   from {
     -webkit-transform: translateX(50%) translateY(50%);
    transform: translateX(50%) translateY(50%);
  }
  to {
     -webkit-transform: translateX(0%) translateY(0%);
    transform: translateX(0%) translateY(0%);
  }
}
<video id="home-bg-video" autoplay>
  <source src="https://www.w3schools.com/html/mov_bbb.mp4">
</video>
vladwoguer
  • 951
  • 1
  • 14
  • 28