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

代码明显没有考虑设备像素比,计算值(font-size)与文章不符 #8

Open
kakaACML opened this issue Apr 21, 2020 · 0 comments

Comments

@kakaACML
Copy link

在完全适配750px原稿的iphone6机型上数据有误;
var width = docEl.getBoundingClientRect().width;
// width = 370
maxWidth = maxWidth || 540;
width>maxWidth && (width=maxWidth);
var rem = width * 100 / designWidth;
// rem = 50`
该方法没有考虑设备像素比,所有计算值和实际文章称font-size=100px(1rem)不符合;

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

1 participant