front-end-interview-handbook/packages/quiz/questions/have-you-played-around-with.../zh-CN.mdx

10 lines
567 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 你玩过新的CSS Flexbox或Grid规范吗
---
Flexbox 主要用于 1 维布局,而网格则用于 2 维布局。
Flexbox 解决了 CSS 中的许多常见问题,例如在容器内的元素垂直切入、粘滞脚等。 著名的 CSS 框架,例如 Bootstrap 和 Bulma 是基于 Flexbox而 Flexbox 仍然是创建布局的经过测试和验证的方式。
Grid 是创建网格布局的最直观的方法,但浏览器支持目前并不广泛。 许多布局问题已经可以通过 Flexbox 解决,因此并没有对 Grid 的巨大需求。