Действительно разочаровывающая проблема, с которой я столкнулся. У меня полноэкранное видео, воспроизводимое на заднем плане моего веб-сайта, однако я разрабатываю макет мобильного устройства и пытаюсь заменить видео изображением.Тем не менее, оно не меняется на изображение на целевой странице на мобильном телефоне - см. Код ниже.
*/ CSS CODE */
@media(max-width:768px) {
.header {
width: 100%;
background-size: contain;
background-position: center;
}
.title h1 {
font-size: 40px;
color: #fff;
top: 150px;
}
p {
font-size: 20px;
font-weight: 600;
}
.middle {
height: 1400px;
background-color: #1f1f20;
}
.social {
margin: 0px;
padding: 10px;
position: absolute;
top: 380%;
left: 30%;
transform: translate(-50%, -50%);
align-items: center;
}
.bottom {
height: 50px;
background-color: #fff;
margin: auto;
font-size: 20px;
color: white;
text-align: justify;
text-align: center;
}
.Ishmayl-writeup {
font-size: 20px;
font-weight: 700;
line-height: 30px;
color: #1f1f20;
}
.title video {
display: none;
}
.title video {
background: url('/images/3.jpg');
background-size: cover;
}
}
@media(min-aspect-ratio:16/9) {
.header {
width: 100%;
height: auto;
}
.header video {
width: 100%;
height: auto;
}
@media(max-aspect-ratio:16/9) {
.header {
width: auto;
height: 100%;
}
.header video {
width: auto;
height: 100%;
}
}
}
*/ HTML CODE */
<body>
<section class="top" id="Home">
<header>
<div class="title">
<div class="video">
<video src="Video/Mountain.mp4" autoplay="true" loop="true" muted type="video/mp4"></video>
<div class="overlay"></div>