码迷,mamicode.com
首页 > 移动开发 > 详细

[PWA] Disable Text Selection and Touch Callouts in a PWA on iOS

时间:2018-12-30 16:18:10      阅读:243      评论:0      收藏:0      [点我收藏+]

标签:first   ESS   nat   eal   disable   ios   touch   abi   some   

Because an installed PWA is really just a web app running in a browser, there are some browser behaviors that we may not want in our app, if we‘re going for a more "native" feel.

We‘ll first disable the ability to select text in our app by setting the css user-select options to none.

Then, we‘ll disable the iOS long-press "callout" menu by setting -webkit-touch-callout to none.

 

App.css

body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  -webkit-touch-callout: none;
}

 

[PWA] Disable Text Selection and Touch Callouts in a PWA on iOS

标签:first   ESS   nat   eal   disable   ios   touch   abi   some   

原文地址:https://www.cnblogs.com/Answer1215/p/10199591.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!