84 lines
1.6 KiB
Markdown
84 lines
1.6 KiB
Markdown
---
|
|
id: 61969aa6acef5b12200f672e
|
|
title: Step 13
|
|
challengeType: 0
|
|
dashedName: step-13
|
|
---
|
|
|
|
# --description--
|
|
|
|
To create some scenery in the background, you will add two mountains.
|
|
|
|
Above the `.penguin` element, add a `div` with a `class` of `left-mountain`.
|
|
|
|
# --hints--
|
|
|
|
You should add a new `div` within `body`. Expected to see `--fcc-expected--` `div` elements, but found `--fcc-actual--`.
|
|
|
|
```js
|
|
assert.equal(document.querySelectorAll('body > div')?.length, 3);
|
|
```
|
|
|
|
You should give the `div` a `class` of `left-mountain`.
|
|
|
|
```js
|
|
assert.include(document.querySelector('body > div:not(.ground, .penguin)')?.className, 'left-mountain');
|
|
```
|
|
|
|
You should place `.left-mountain` before `.penguin`.
|
|
|
|
```js
|
|
assert.strictEqual(document.querySelector('.penguin')?.previousElementSibling, document.querySelector('.left-mountain'));
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```html
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="stylesheet" href="./styles.css" />
|
|
<title>Penguin</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
</head>
|
|
|
|
--fcc-editable-region--
|
|
<body>
|
|
|
|
<div class="penguin"></div>
|
|
<div class="ground"></div>
|
|
</body>
|
|
--fcc-editable-region--
|
|
</html>
|
|
```
|
|
|
|
```css
|
|
body {
|
|
background: linear-gradient(45deg, rgb(118, 201, 255), rgb(247, 255, 222));
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.penguin {
|
|
width: 300px;
|
|
height: 300px;
|
|
margin: auto;
|
|
margin-top: 75px;
|
|
}
|
|
|
|
.ground {
|
|
width: 100vw;
|
|
height: 400px;
|
|
background: linear-gradient(90deg, rgb(88, 175, 236), rgb(182, 255, 255));
|
|
z-index: 3;
|
|
position: absolute;
|
|
}
|
|
```
|