我已尝试使用Google搜索,但似乎无法正确执行此操作。
我已经为iPhone 7 plus制作了媒体屏幕查询代码和视口,但它不会出现在我的设备上。我试过在Chrome上进行检查,它看起来应该正确。这是代码:
@media screen and (height:736px) and (width:414px){
div.banner{
height:600px;
background-image:url(../../assets/img/mobilehome.jpg)!important
}
答案 0 :(得分:-1)
/* ----------- iPhone 6, 6S, 7 and 8 ----------- */
/* Portrait and Landscape */
@media only screen
and (min-device-width: 375px)
and (max-device-width: 667px)
and (-webkit-min-device-pixel-ratio: 2) {
}
积分:https://css-tricks.com/snippets/css/media-queries-for-standard-devices/