设备独立像素比例值与物理像素

  1. 获取独立像素与物理像素比例值
     window.devicePixelRatio
  1. 获取设备的物理像素
    屏幕的宽度:window.screen.width
    屏幕的高度:window.screen.height

猜你喜欢

转载自blog.csdn.net/weixin_42442123/article/details/88202836