freeCodeCamp/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-intermediate-css-by-b.../60b69a66b6ddb80858c5157d.md

55 lines
992 B
Markdown

---
id: 60b69a66b6ddb80858c5157d
title: 步驟 7
challengeType: 0
dashedName: step-7
---
# --description--
使用 id 選擇器爲 `back-wall` 元素提供顏色爲 `#8B4513``background-color`
# --hints--
應該使用 `#back-wall` 選擇器。
```js
assert(new __helpers.CSSHelp(document).getStyle('#back-wall'));
```
`#back-wall` 選擇器應該有一個 `#8B4513``background-color`
```js
assert(new __helpers.CSSHelp(document).getStyle('#back-wall')?.backgroundColor === 'rgb(139, 69, 19)');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Picasso Painting</title>
<link rel="stylesheet" href="./styles.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
</head>
<body>
<div id="back-wall"></div>
</body>
</html>
```
```css
body {
background-color: rgb(184, 132, 46);
}
--fcc-editable-region--
--fcc-editable-region--
```