开发者

Eliminating auto zooming in mobile safari textarea widget?

开发者 https://www.devze.com 2023-02-04 16:40 出处:网络
I developed a web app for the iPhone which has a page with a textarea widget.When I begin editing the contents of this textarea widget Safari zooms in and makes the text really, really big.Now I can\'

I developed a web app for the iPhone which has a page with a textarea widget. When I begin editing the contents of this textarea widget Safari zooms in and makes the text really, really big. Now I can't see the document anymore, just a little postage stamp sized piece of it.

Are there any properties I can set which will keep mobile Saf开发者_如何学Cari from doint this? I just want the textarea font to stay the same size when I edit its text. Thanks.


You can add:

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

to your HTML header.


You would need to set your textarea font-size to 16px and have an initial-scale of 1.0.

But if your app is not really designed for the iPhone, that is, if it’s essentially a normal web page that users should be able to scale, then you should probably just become okay with it. The worst thing to do to your users is show them 6pt text they can’t zoom, you know? Some of them won’t have perfect vision.

See also: Apple's list of all Safari/iOS special meta tags.

0

精彩评论

暂无评论...
验证码 换一张
取 消