HTML5 Boilerplate: Meta viewport and width=device-width

后端 未结 5 1325
长情又很酷
长情又很酷 2020-12-23 14:15

I\'m building an adaptive/responsive website.

Regarding this recent change to the HTML5BP:

\"mobile/iOS css revisions\"

I\'ve started using:

5条回答
  •  青春惊慌失措
    2020-12-23 14:21

    It's not a new standard, it's how it's always worked AFAIK. If you set the width to a fixed number of pixels, then rotating portrait to landscape just changes the scale, because the number of virtual pixels remains constant. I'm guessing that adding initial-scale=1 is blocking the scaling as you switch between - that is the scaling factor of your page doesn't change as the device is rotated. What does the page look like if you load it initially in landscape instead of portrait?

    I would suggest that if you want the behaviour you get when you specify initial-scale=1, then specify initial-scale=1. HTML5 BoilerPlate is something you're supposed to modify to suit your own requirements.

提交回复
热议问题