我有一个移动网站。 例如,我针对 android 对其进行了优化
@media only screen
and (max-height : 1280px) {
html {
font-size: 18pt;
}
}
@media only screen and (orientation:portrait)
and (max-height : 452px) {
html {
font-size: 15pt;
}
}
但在 ios 上它看起来真的很糟糕。我可以使用两组媒体查询,一组用于 android,一组用于 ios 吗? 现在我无法让它同时适用于他们两个。
请显示一个针对 android 设备的媒体查询和一个针对 ios 设备的媒体查询。
最佳答案
你可以试试这个
@media(orientation:landscape)
{
html {
font-size: 18pt;
}
}
@media (orientation: portrait) {
html {
font-size: 15pt;
}
}
关于android - css 媒体查询 - 如何仅针对 ios 或 android 设备?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25757874/