Viewport = idealViewPort = idealViewPort

Meta tags

<meta name="viewport" The content = "width = device - width, initial - scale = 1.0, the minimum - scale = 1.0, the maximum - scale = 1.0, user - scalable = no" / >

  • // width Sets the viewport width to a positive integer, or the string ‘device-width’
  • // device-width Specifies the device width
  • // height Sets the height of the viewport. Generally, if the width is set, the height will be automatically resolved
  • // initial-scale Specifies the default scale (initial scale), which can be a number with a decimal
  • // minimum-scale allows the user to scale at a minimum of one number, possibly with a decimal
  • // maximum-scale allows the user to scale to a single number with a decimal number
  • // User-scalable Whether manual scaling is allowed

Local processing

Rem according to the design standard, plus using the transform scale(0.5) to reduce double;

Global processing

Set the viewport attribute in the meta tag to 0.5 rem for initial-scale