-
Notifications
You must be signed in to change notification settings - Fork 158
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
我该使用 px 还是 % 开发?能使用 vh/rem 等相对单位吗? #54
Comments
很多人有这个疑惑,我这里统一说明一下:autofit.js只干了一件事,就是对最外层容器(默认是body)设置了宽高(px)和缩放(scale),你可以先新建一个空白项目来尝试理解。 |
tailwindcss 这些也是用不了? |
可以用的 |
我刚试了下,不行tailwindcss 是rem |
tailwindcss 可以配置单位的, 也可以临时用 |
rem也可以固定,vh,vw固定不了 |
rem 、 vh\vw 和 scale 一起使用 理论上会 造成双倍适配,不建议使用相对单位哈 |
根据readme中描述,使用autofit.js,能够自动的拉伸或者缩小,对于大屏开发来讲,的确解决了好多问题,这里有两个基础的地方不太明白:
根据设计稿进行页面开发,最外层容器的宽与高是用设计稿的像素还是百分比?还是两者兼可?
容器内部各个元素的宽高,以及padding,margin的值用像素还是百分比?css可定义的值太多了,px, rem ,vh/vw,em,这些在引用autofit.js的项目中,是可以混用,还是单纯便用px来统一开发?
The text was updated successfully, but these errors were encountered: