{I+=codeWee;} |
In HTML, Do not use width="", hegith="" <body style="overflow:hidden"> ... <video id="myVideo"> <source src="myVideo.mp4" type="video/mp4"> </video> In CSS, #myVideo{ position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); height:100%; min-height: 100%; } @media (min-aspect-ratio: 16/9){ #myVideo{ width: 100%; height: auto; min-width: 100%; max-height: none; } } or #myVideo{ height: 100%; width: 100%; object-fit: cover; overflow: hidden; }