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

540px #195

Open
tianfuzhou opened this issue Jul 15, 2019 · 3 comments
Open

540px #195

tianfuzhou opened this issue Jul 15, 2019 · 3 comments

Comments

@tianfuzhou
Copy link

代码中为啥是条件为啥是540px

@Ruobin521
Copy link

同问

@Ruobin521
Copy link

个库本身设定了最大值,当页面宽度大于某个值的时候,计算rem基数的基准就是这个值而不是页面实际的宽度。这种情况下,计算出来的rem的基数就会比实际要小,某些元素的属性实际展现就会比预想的要小。实际上,我觉得淘宝的想法应该是这个库本身是适用于移动端的页面,是小页面通用的,而当页面大于某个值的时候,这一套体系下很多东西就不适用了,比如说字体或者某些元素的宽度之类的,这种情况下他们推荐的做法应该是以他们设定的这个值为基准来布局,但是把页面的主体元素居中,两边留空。
---引用其他地方的回答

@Ruobin521
Copy link

我的理解就是对于宽页面的一个容错处理,对于fontsize设置还是可以直接理解为width/10就好了

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