We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
H5项目中,使用动态设置html的font-size,在通过rem做单位适配页面布局,但是该方案会影响WeUI组件样式,请问有什么解决方案嘛?
The text was updated successfully, but these errors were encountered:
@kusofte-chap 请问是怎么影响到的呢?方便提供下截图吗?
Sorry, something went wrong.
1、设计稿按750设计的 2、在项目里使用rem适配方案具体代码如下: const html = document.getElementsByTagName("html")[0]; const resize = () => { html.style.fontSize = Math.min(Math.max(document.body.clientWidth, 320) / 7.5, 100) + "px"; }; window.addEventListener("resize", resize, false); resize();
const html = document.getElementsByTagName("html")[0];
const resize = () => {
html.style.fontSize =
Math.min(Math.max(document.body.clientWidth, 320) / 7.5, 100) + "px";
};
window.addEventListener("resize", resize, false);
resize();
加入上述代码之后页面里引用的weui组件样式会受到影响无法适配移动端,截图:
No branches or pull requests
H5项目中,使用动态设置html的font-size,在通过rem做单位适配页面布局,但是该方案会影响WeUI组件样式,请问有什么解决方案嘛?
The text was updated successfully, but these errors were encountered: