移动网络的 max-device-width 和 max-width 有什么区别? [英] What is the difference between max-device-width and max-width for mobile web?
本文介绍了移动网络的 max-device-width 和 max-width 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要为iphone/android手机开发一些html页面,但是max-device-width
和max-width
有什么区别?我需要为不同的屏幕尺寸使用不同的 css.
I need to develop some html pages for iphone/android phones, but what is the difference between max-device-width
and max-width
? I need to use different css for different screen size.
@media all and (max-device-width: 400px)
@media all and (max-width: 400px)
有什么区别?
推荐答案
max-width
是目标显示区域的宽度,例如浏览器
max-width
is the width of the target display area, e.g. the browser
max-device-width
是设备整个渲染区域的宽度,即实际设备屏幕
max-device-width
is the width of the device's entire rendering area, i.e. the actual device screen
max-height
和 max-device-height
自然也是如此.
Same goes for max-height
and max-device-height
naturally.
这篇关于移动网络的 max-device-width 和 max-width 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文