---
id: 587d78af367417b2b2512b00
title: Use the align-self Property
challengeType: 0
videoUrl: ''
localeTitle: 使用align-self属性
---
## Description
flex项的最终属性是align-self
。此属性允许您单独调整每个项目的对齐方式,而不是一次性设置它们。这很有用,因为使用CSS属性float
, clear
和vertical-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
## Solution
```js
// solution required
```