feat: Add CSS layout exercises and corresponding HTML files
- Created multiple exercises under the CSS layout section, including: - Final page layout with CSS styles and HTML structure. - Display and flow concepts with examples of block, inline, and none display types. - Selectors and pseudo-classes with practical examples. - Overflow and sizing handling in CSS. - Grid layout basics for two-dimensional layouts. - Fixed and sticky positioning examples. - Centering techniques for common layout scenarios. - Added README files for each exercise to outline objectives and file structures. - Updated main README to include new sections and usage instructions.
This commit is contained in:
30
02-css-layout/03-flex-layout/README.md
Normal file
30
02-css-layout/03-flex-layout/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# 练习 3:Flex 布局
|
||||
|
||||
## 目标
|
||||
|
||||
学会用 Flex 做横向排列、间距和居中。
|
||||
|
||||
## 你要练什么
|
||||
|
||||
- `display: flex`
|
||||
- `justify-content`
|
||||
- `align-items`
|
||||
- `gap`
|
||||
- `flex: 1`
|
||||
|
||||
## 任务
|
||||
|
||||
请完成一个三列学习面板,要求:
|
||||
|
||||
- 3 个卡片横向排列
|
||||
- 卡片之间有统一间距
|
||||
- 每个卡片宽度尽量均分
|
||||
- 标题和按钮排版清晰
|
||||
- 整个区域居中显示
|
||||
|
||||
## 文件
|
||||
|
||||
- [starter.html](/Volumes/Macintosh HD 1/home/front-end-example/02-css-layout/03-flex-layout/starter.html)
|
||||
- [starter.css](/Volumes/Macintosh HD 1/home/front-end-example/02-css-layout/03-flex-layout/starter.css)
|
||||
- [answer.html](/Volumes/Macintosh HD 1/home/front-end-example/02-css-layout/03-flex-layout/answer.html)
|
||||
- [answer.css](/Volumes/Macintosh HD 1/home/front-end-example/02-css-layout/03-flex-layout/answer.css)
|
||||
Reference in New Issue
Block a user