admin管理员组文章数量:1287162
I'm building a web app and I want to disable zooming with multi-touch. I have tried this
<meta name="viewport" content=" width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
but it's not working. How can I implement this? The app will run on tablets.
I'm building a web app and I want to disable zooming with multi-touch. I have tried this
<meta name="viewport" content=" width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
but it's not working. How can I implement this? The app will run on tablets.
Share Improve this question edited Feb 14 at 21:19 TylerH 21.1k77 gold badges79 silver badges112 bronze badges asked Jul 22, 2020 at 10:18 SolyzaSolyza 851 gold badge1 silver badge5 bronze badges1 Answer
Reset to default 8With React-Helmet you can put your metadata in the render-function of your Component like this:
render(){
return <div>
<Helmet>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
</Helmet>
[...]
</div>
}
Look at the Helmet documentation for further information.
本文标签: javascriptHow to disable multitouch zoom in React JSStack Overflow
版权声明:本文标题:javascript - How to disable multi-touch zoom in React JS - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741217951a2360415.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论