首页 > 移动平台 > 详细

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

时间:2018-12-30 15:51:59      阅读:137      评论:0      收藏:0      [点我收藏+]

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!