我已经按照以下方式编写了媒体查询:
@media only screen and (max-device-width: 600px) and (orientation: portrait) {
.img-responsive{
height : 200px;
width : 100px;
}
}
@media only screen and (max-device-width: 600px) and (orientation: landscape) {
.img-responsive{
width : 95px;
height : 100px;
}
}
竖屏显示正常,但横屏显示时CSS似乎不起作用。
max-device-*
和min-device-*
。http://stackoverflow.com/a/36749882/3597276 - Michael Benjaminorientation
条件),接着是一个用于肖像模式的查询以及一个适用于所有设备的横向查询。不过,这个列表似乎还有一些其他条件问题。 - CPHPython