我正在使用媒体查询来定位iphone/ipad/mobile。媒体查询目标iphone/mobile/ipad
我写了下面的媒体查询。
但我的问题是,如果我在手机媒体查询中写入CSS'max-device-width:480px',它也适用于iphone。
我做错了吗?
For mobile : like samsung grand(480 * 800):
@media only screen
and (max-device-width : 480px)
{
}
For iphone:
@media only screen
and (max-device-width : 320px)
{
}
For ipad:
@media screen and (min-width:760px)
{
}
还添加meta标签:
<meta name="viewport" content="user-scalable=no,initial-scale=1">