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

请问大佬在设置宽高时用了什么工具 #43

Open
dandwang opened this issue Jul 18, 2018 · 1 comment
Open

请问大佬在设置宽高时用了什么工具 #43

dandwang opened this issue Jul 18, 2018 · 1 comment

Comments

@dandwang
Copy link

例如 widthHeight(0.9386666667rem,0.7466666667rem) 这种这么精确的数值是如何实现的

@MarshallShady
Copy link

这种一般是用less之类计算后的结果,举个例子:先设置页面的html上的font-size:37.5px(rem是基于根元素的字体大小计算的),然后我的div是100px宽度,那么设置这个div宽的时候这样写:100/37.5rem,这样出来的就是比例换算过的rem值了。

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

2 participants