---
id: 587d78ab367417b2b2512af3
title: 使用 flex-direction 在嵌入推文中創建多行
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVaDAv/cJb8yuq'
forumTopicId: 301104
dashedName: apply-the-flex-direction-property-to-create-rows-in-the-tweet-embed
---
# --description--
嵌入推文示例中的 `header` 和 `footer` 有自己的子元素,使用 `flex-direction` 屬性可以把這些子元素排成行。 這個屬性告訴 CSS 需要將這些子元素水平排列。
# --instructions--
爲 `header` 和 `footer` 添加 CSS 屬性 `flex-direction`,並把值設爲 `row`。
# --hints--
`.follow-btn` 應在頁面上呈現。 請關閉廣告攔截器等任何擴展。
```js
assert($('.follow-btn').length > 0 && $('.follow-btn').css('display') !== 'none');
```
`header` 應有 `flex-direction` 屬性,其值應爲 `row`。
```js
assert(code.match(/header\s*?{[^}]*?flex-direction:\s*?row;/g));
```
`footer` 應有 `flex-direction` 屬性,其值應爲 `row`。
```js
assert(code.match(/footer\s*?{[^}]*?flex-direction:\s*?row;/g));
```
# --seed--
## --seed-contents--
```html
Quincy Larson
@ossia
I meet so many people who are in search of that one trick that will help them work smart. Even if you work smart, you still have to work hard.
1:32 PM - 12 Jan 2018I meet so many people who are in search of that one trick that will help them work smart. Even if you work smart, you still have to work hard.
1:32 PM - 12 Jan 2018