Home  >  Q&A  >  body text

前端 - 移动端网页把meta的viewport的宽度设置成设计稿的宽度会有问题吗?

伊谢尔伦伊谢尔伦2722 days ago448

reply all(5)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 13:49:24

    It is recommended to use rem to layout according to the font-size set in HTML. If the width sent upstairs is not that wide or narrower than it, the user will not be able to see the full screen or swipe to see the current one-screen interface.

    reply
    0
  • 迷茫

    迷茫2017-04-17 13:49:24

    It is recommended to use rem layout, set font-size on the root element, and then perform conversion based on the font-size according to the proportion of the design drawing.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 13:49:24

    There is no benefit in hard-coding the size, and the display effect is not good on a large screen

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 13:49:24

    I always write like this. The advantage is that it is easier to write weird pages. The disadvantage is that I have found that the text on the page displays in different sizes on different mobile phones

    And it is best to define the screen width in conjunction with js for better compatibility

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 13:49:24

    Of course there are problems. The width of the design draft is generally enlarged by 2 times. If the requirements are not high, it is generally sufficient to reduce the size. If there are many compatible machines, it is recommended to use rem. Dynamically set dpr and font-size for different machines, and then restore the design draft. For details, refer to Solutions from Taobao flexbox or NetEase

    reply
    0
  • Cancelreply