Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios webview特别处理小结——总结计划(二) #31

Open
damoclesX opened this issue Dec 6, 2016 · 0 comments
Open

ios webview特别处理小结——总结计划(二) #31

damoclesX opened this issue Dec 6, 2016 · 0 comments

Comments

@damoclesX
Copy link
Owner

damoclesX commented Dec 6, 2016

项目期间遇到一个问题,ios webview中字体的大小总比设置的大,通过开发者模式查看,css代码中的设置的值既没有被应用,也没有被覆盖,字体的大小总是不匹配,原来是没有设置: -webkit-text-size-adjust为none原因。

-webkit-text-size-adjust:none

ios webview中长按有文字的地方,唤出了webview默认的操作界面(复制,选择...),原始的touch事件触发不了。设置以下代码即可

-webkit-user-select:none;
-webkit-touch-callout: none;

视频内联播放

<video webkit-playsinline>
webview.allowsInlineMediaPlayBack = YES

视频自动播放

webview.mediaPlaybackRequiresUserAction = NO

文件上传
参考地址

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant