if (typeof (WeixinJSBridge) == "undefined") {
document.addEventListener("WeixinJSBridgeReady", function (e) {
setTimeout(function () {
// 直接修改用户设置的/默认字体
WeixinJSBridge.invoke(‘setFontSizeCallback‘, {
"fontSize": 0
}, function (res) {});
// 重写设置网页字体大小的事件
WeixinJSBridge.on(‘menu:setfont‘, function () {
WeixinJSBridge.invoke(‘setFontSizeCallback‘, {
‘fontSize‘: 0
});
});
}, 0);
});
} else {
setTimeout(function () {
WeixinJSBridge.invoke(‘setFontSizeCallback‘, {
"fontSize": 0
}, function (res) {});
}, 0);
}
ios
- body
- {
- -webkit-text-size-adjust: 100% !important;
- text-size-adjust: 100% !important;
- -moz-text-size-adjust: 100% !important;
- }