Reputation: 13555
Here is the test link:
The site now is exactly the way I would like to present, one problem is , if I set to
<meta name="viewport" content="width=device-width, initial-scale=1">
on mobile it will zoom
And I tried to set
<meta name="viewport" content="width=device-width, initial-scale=0">
However, this will affect the layout and some block will move into wrong position.
So, I wonder how to set not to zoom in mobile by default? Javascript/ jquery is also welcome if meta can not fulfill the needs
Thanks.
Update:
Thanks for answering.
Either no scrollable , max scale =1 , min scale = 1, the inital width is still the zoomed version, and can not scale down this time.
Sorry for confusing, the idea is , can the width begin is exactly the width of device? then it is not zoomed
Or what I need to do is to zoom to the smallest scale.
Upvotes: 0
Views: 80
Reputation: 179
The user-scalable
parameter should do it.
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
Otherwise, you can set minimum-scale
and maximum-scale
to 1.0
Upvotes: 4
Reputation: 3896
Using the user-scalable attribute
<meta name="viewport" content="width=device-width, user-scalable=no" />
Upvotes: 2