когда я использую ширину, поскольку мой параметр "min-width" медиа-запросы работают нормально. но когда я использую min-height и max-height, последний размер, который я ввожу, — это тот, который работает. мой код:
@media only screen
and (min-height : 0px) , screen and (max-height: 600px) {
#guy{
position:absolute;
top:180px;
width:100%;
height:680px;
background:url(../img/guy.png);
background-repeat:no-repeat;
z-index:1;
background-size: 650px 450px;
}
}
@media only screen
and (min-height : 601px) , screen and (max-height: 800px) {
#guy {
position: absolute;
top: 80px;
width: 100%;
height: 680px;
background: url(../img/guy.png);
background-repeat: no-repeat;
z-index: 1;
background-size: 450px 250px;
background-position: center center;
}
}
@media only screen
and (min-height : 800px) , screen and (max-height: 1000px) {
#guy {
position: absolute;
top: 160px;
width: 100%;
height: 680px;
background: url(../img/guy.png);
background-repeat: no-repeat;
z-index: 1;
background-size: 650px 450px;
background-position: center center;
}
}
@media only screen
and (min-height : 1001px) , screen and (max-height: 1600px) {
#guy {
position: absolute;
top: 220px;
width: 100%;
height: 680px;
background: url(../img/guy.png);
background-repeat: no-repeat;
z-index: 1;
background-size: 850px 650px;
background-position: center center;
}
}
@media only screen
and (min-height : 1601px) , screen and (max-height: 4000px) {
#guy {
position: absolute;
top: 260px;
width: 100%;
height: 680px;
background: url(../img/guy.png);
background-repeat: no-repeat;
z-index: 1;
}
}
и независимо от того, какое разрешение у моего экрана, работает только минимальная высота: 1600 пикселей и максимальная 4000 пикселей, если я не ошибаюсь, я могу правильно использовать высоту в качестве параметра? Я также не думаю, что есть проблема с синтаксисом. У кого-нибудь была эта проблема?