---
id: 587d78ae367417b2b2512afc
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVaDAv/c2p78cg'
forumTopicId: 1301111
title: 使用 flex-grow 属性扩展项目
---
## Description
与flex-shrink相对的是flex-grow。你应该还记得,flex-shrink会在容器太小时对元素作出调整。相应地,flex-grow会在容器太大时对元素作出调整。
例子与上一个挑战相似,如果一个项目的flex-grow属性值为 1,另一个项目的flex-grow属性值为 3,那么后者会较前者扩大 3 倍。
## Instructions
为#box-1和#box-2添加 CSS 属性flex-grow,#box-1的值设为 1,#box-2的值设为 2。
## Tests
```yml
tests:
- text: #box-1元素应有flex-grow属性,其值应为 1。
testString: assert($('#box-1').css('flex-grow') == '1');
- text: #box-2元素应有flex-grow属性,其值应为 2。
testString: assert($('#box-2').css('flex-grow') == '2');
```
## Challenge Seed
## Solution
```html
// solution required
```