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

对于固定比例整体缩放的页面 #18969

Closed
1 task done
SongJuXin opened this issue Sep 24, 2019 · 1 comment
Closed
1 task done

对于固定比例整体缩放的页面 #18969

SongJuXin opened this issue Sep 24, 2019 · 1 comment
Assignees

Comments

@SongJuXin
Copy link

SongJuXin commented Sep 24, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

产品形态为固定宽高比(比值为16:9)的一屏展示的页面,没有滚动条。大分辨率屏看到更大的字,而不是更多的内容。

由于antd样式单位是px,无法解决以上问题,我想了两种解决方案,但都不能完美解决问题:

  1. 用rem这种相对尺寸,ant的css里的px通过px2rem-loader转换成rem。问题ant动态生成的在inline-style样式的组件不能转换
  2. 用px,页面通过transform scale进行整体缩放。问题仍是ant动态生成的inline-style样式的组件经过缩放后会错位。

What does the proposed API look like?

期望可以支持相对单位(比如rem)作为ant的单位。

不能支持相对尺寸的话,能不能指点一下,有木有其他解决方案。

@zombieJ
Copy link
Member

zombieJ commented Sep 27, 2019

Use webpack plugin to convert px to rem. You can get related articles by search engine.

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

3 participants