daGUY
daGUY

Reputation: 28773

How to use “viewport-fit=cover” and “maximum-scale=1” without disabling zoom on Android

I’ve been using the following viewport meta tag on my site:

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover" />

On iPhone, this gives me the exact behavior that I want:

But on Android, maximum-scale=1 and viewport-fit=cover prevent zooming entirely, and the only way I’ve found to avoid that is to just remove both properties. But then I lose the benefits of including them on the iPhone as well.

Is there any way I can keep both of these properties in my meta tag but also still allow manual pinch-to-zoom on Android?

Upvotes: 2

Views: 5428

Answers (1)

Joel A. V.
Joel A. V.

Reputation: 141

You should have been able to achieve what you were looking for by modifying the maximum-scale to something at least above 3.0. Having it as a max of one doesn't allow for any zoom in.

Maximum-scale relates to zoom in and minimum to zoom out from my understanding.

Upvotes: 0

Related Questions