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

页面布局 #45

Open
lewenweijia opened this issue Oct 23, 2019 · 4 comments
Open

页面布局 #45

lewenweijia opened this issue Oct 23, 2019 · 4 comments

Comments

@lewenweijia
Copy link
Owner

lewenweijia commented Oct 23, 2019

前端布局发展史
表格布局(table) -> 定位(position) -> 浮动布局(float) -> 弹性盒布局(flex) -> 栅格布局(grid)
混杂定位 + 浮动, 弹性+弹性, 弹性+定位, 栅格+弹性, 栅格+定位

布局的发展动力?:

  1. 前期可以很好满足, 发挥重要作用
  2. 某时期开始无法很好地满足需求, 越来越潮流的方式

vw? 解决rem需要在css基础上借助js进行辅助的缺点

css3中的n都是以1作为起始值, 也就是css不是作为变成语言, 而是更多的作为描述语言

@lewenweijia
Copy link
Owner Author

最便捷的垂直居中

.container { display: flex; }
.item { margin: auto }

@lewenweijia
Copy link
Owner Author

词汇
vmin/vmax: 取宽高最小/最大的那一个

@lewenweijia
Copy link
Owner Author

工具
evrone/postcss-px-to-viewport

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

1 participant