Ich habe ein Problem, das ich noch nicht bei Media-Abfragen hatte. Ich habe dieses Problem hauptsächlich auf mobilen Geräten in Chrome und Opera, aber nicht in Safari und Firefox.CSS Media-Abfragen Problem
Ich habe eine Schaltfläche, die display
Eigenschaft auf none
für Geräte mit Bildschirm mehr als 769px und standardmäßig auf inline-block
festgelegt hat. Die meisten Browser ändern jedoch die Eigenschaft für Geräte mit einem Bildschirm unter 769 Pixel nicht in inline-block
. Hier ist ein Pseudo-Code:
CSS:
.btn_play {
display: inline-block;
width:21.875%;
border-radius:50%;
background: #F7F7F7;
font-size: 0;
font-weight: normal;
text-align:center;
color: inherit;
vertical-align: middle;
position: relative;
z-index: 22;
}
@media (min-width: 320px) and (orientation: landscape) {
.btn_play {
display: inline-block;
}
.btn_play_desktop {
display: none;
}
}
@media (min-width: 769px) and (orientation: landscape){
.btn_play {
display: none;
}
.btn_play_desktop {
display: inline-block;
}
}
Haben Sie das '' tag auf Ihrer Seite hinzugefügt? –