--- id: 587d78af367417b2b2512b00 title: Use the align-self Property challengeType: 0 videoUrl: '' localeTitle: 使用align-self属性 --- ## Description
flex项的最终属性是align-self 。此属性允许您单独调整每个项目的对齐方式,而不是一次性设置它们。这很有用,因为使用CSS属性floatclearvertical-align其他常用调整技术对flex项不起作用。 align-self接受与align-items相同的值,并将覆盖align-items属性设置的任何值。
## Instructions
将CSS属性align-self添加到#box-1#box-2 。给#box-1一个中心值,给#box-2一个flex-end值。
## Tests
```yml tests: - text: '#box-1元素应将align-self属性设置为center的值。' testString: 'assert($("#box-1").css("align-self") == "center", "The #box-1 element should have the align-self property set to a value of center.");' - text: '#box-2元素应该将align-self属性设置为flex-end的值。' testString: 'assert($("#box-2").css("align-self") == "flex-end", "The #box-2 element should have the align-self property set to a value of flex-end.");' ```
## Challenge Seed
```html
```
## Solution
```js // solution required ```