三星Galaxy A20视口大小



我必须为Samsung A20编写纵向和横向的自定义媒体查询,但我找不到视口。有人知道吗?(对于A20s或A20e,而非(。

感谢

您可以根据此处的要求更改最小和最大宽度

@media only screen and (min-width: 200px) and (max-width: 414px) and (orientation : portrait) {
//Put your CSS here for 200px to 414px width devices (cover all mobile portrait width //        
}


@media only screen and (min-width: 500px) and (max-width: 767px) and (orientation:landscape) {
//Put your CSS here for 500px to 7674px width devices (cover all mobile landscape width //        
}

您可以查询当前设备视口大小:

window.innerWidth
window.innerHeight

简而言之,如果你要瞄准每一台移动设备,你会快疯了。因此,作为一名前端开发人员,我的建议是,你应该始终寻找主要的突破点,永远不要忘记从";最大宽度";在媒体查询中。。。。最大宽度将帮助您将目标从0到396px或396px到768px。但最小宽度将允许从396px到0。所以最大宽度是最好的选择和寻找移动设备的主要断点

A20人像的媒体查询:@仅媒体屏幕和(最小设备宽度:320px(和(最大设备高度:694px(

(我不完全确定WebKit,但你可以试试2.2(

和(-webkit设备像素比:2.2(

最新更新