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

如何针对微信浏览器的调整字体大小功能进行适配? #202

Open
linguo2625469 opened this issue Jun 5, 2020 · 5 comments

Comments

@linguo2625469
Copy link

在微信浏览器内可以调整字体 调整后布局会错乱

@beill
Copy link

beill commented Jun 17, 2020

我也是遇见了这个问题

@scplay
Copy link

scplay commented Jul 7, 2020

@linguo2625469
Copy link
Author

https://www.jianshu.com/p/22c9b810704b

谢谢!

@hsqoo
Copy link

hsqoo commented Jul 17, 2020

微信jssdk,有个初始化字体的方法
(function() { if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") { handleFontSize(); } else { if (document.addEventListener) { document.addEventListener("WeixinJSBridgeReady", handleFontSize, false); } else if (document.attachEvent) { document.attachEvent("WeixinJSBridgeReady", handleFontSize); document.attachEvent("onWeixinJSBridgeReady", handleFontSize); } } function handleFontSize() { // 设置网页字体为默认大小 WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 }); // 重写设置网页字体大小的事件 WeixinJSBridge.on('menu:setfont', function() { WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 }); }); } })();

@gitHub61
Copy link

安卓设置更改了系统字号,在app内导致页面错乱

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

No branches or pull requests

5 participants