主要用于移动端内容适配,由于移动端有时候需要根据高度来进行适配,比如iPhone4和iPhone5的宽度一样,但是高度不同

/*iphone4*/
@media only screen and (max-width: 320px) and (max-width: 480px) {
html,body{
font-size: 12px;
}
}
/*iphone5*/
@media only screen and (max-width: 320px) and (min-height: 568px) {
html,body{
font-size: 14px;
}
}
/*ihpne6,7,8*/
@media only screen and (min-width: 375px) and (max-width: 413px) {
html,body{
font-size: 16px;
}
}
/*ihpne6,7,8Plus*/
@media only screen and (min-width: 414px) and (max-width: 640px) {
html,body{
font-size: 18px;
}
}

相关文章:

  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2022-02-13
猜你喜欢
  • 2021-06-16
  • 2022-01-08
  • 2022-12-23
  • 2021-09-28
  • 2022-03-02
  • 2022-12-23
相关资源
相似解决方案