--- id: 587d78ae367417b2b2512afc title: Use the flex-grow Property to Expand Items challengeType: 0 videoUrl: '' localeTitle: 使用flex-grow属性扩展项目 --- ## Description
flex-shrink相反的是flex-grow属性。回想一下,当容器缩小时, flex-shrink控制项目的大小。当父容器展开时, flex-grow属性控制项的大小。使用上一个挑战中的类似示例,如果一个项目的flex-grow值为1而另一个项目的flex-grow值为3,则值为3的项目将增长为另一个项目的三倍。
## Instructions
将CSS属性flex-grow添加到#box-1#box-2 。将#box-1的值设为1,将#box-2的值设为2。
## Tests
```yml tests: - text: '#box-1元素应将flex-grow属性设置为值1。' testString: 'assert($("#box-1").css("flex-grow") == "1", "The #box-1 element should have the flex-grow property set to a value of 1.");' - text: '#box-2元素应将flex-grow属性设置为值2。' testString: 'assert($("#box-2").css("flex-grow") == "2", "The #box-2 element should have the flex-grow property set to a value of 2.");' ```
## Challenge Seed
```html
```
## Solution
```js // solution required ```