---
id: 6153893900438b4643590367
title: 步骤 9
challengeType: 0
dashedName: step-9
---

# --description--

从 `body` 元素中删除外边距，将 `font-family` 设置为 `sans-serif`，并将 `background-color` 设置为 `#f5f6f7`。

# --hints--

你应该有一个 `body` 选择器。

```js
assert.exists(new __helpers.CSSHelp(document).getStyle('body'));
```

`body` 选择器的 `margin` 属性应该设置为 `0`。

```js
assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.marginTop, '0px');
assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.marginBottom, '0px');
assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.marginLeft, '0px');
assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.marginRight, '0px');
```

`body` 选择器的 `font-family` 属性应该设置为 `sans-serif`。

```js
assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === 'sans-serif');
```

`body` 选择器的 `background-color` 属性应该设置为 `#f5f6f7`。

```js
assert(new __helpers.CSSHelp(document).getStyle('body')?.backgroundColor === 'rgb(245, 246, 247)');
```

# --seed--

## --seed-contents--

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Photo Gallery</title>
    <link rel="stylesheet" href="./styles.css">
  </head>
  <body>
    <header class="header">
      <h1>css flexbox photo gallery</h1>
    </header>
    <div class="gallery">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/1.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/2.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/3.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/4.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/5.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/6.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/7.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/8.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/9.jpg">
    </div>
  </body>
</html>
```

```css
* {
  box-sizing: border-box;
}

--fcc-editable-region--

--fcc-editable-region--

.gallery img {
  width: 100%;
  max-width: 350px;
  height: 300px;
}
```
