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
viewport + rem 实现 在根元素html设置font-size. 将元素转换成rem,通过 window.devicePixelRatio 拿到dpr 再写meta 设置 viewport的scale : 1/dpr
参考:使用Flexible实现手淘H5页面的终端适配 Flexible实现思路:
<meta>
<html>
data-dpr
font-size
The text was updated successfully, but these errors were encountered:
No branches or pull requests
viewport + rem 实现
在根元素html设置font-size. 将元素转换成rem,通过 window.devicePixelRatio 拿到dpr 再写meta 设置 viewport的scale : 1/dpr
参考:使用Flexible实现手淘H5页面的终端适配
Flexible实现思路:
<meta>
标签<html>
元素添加data-dpr
属性,并且动态改写data-dpr
的值<html>
元素添加font-size
属性,并且动态改写font-size
的值The text was updated successfully, but these errors were encountered: