1.7 KiB
1.7 KiB
id | title | challengeType | dashedName |
---|---|---|---|
61969aa6acef5b12200f672e | Step 13 | 0 | step-13 |
--description--
Per creare uno scenario sullo sfondo, aggiungerai due montagne.
Sopra l'elemento .penguin
, aggiungi un div
con un attributo class
di left-mountain
.
--hints--
Dovresti aggiungere un nuovo div
all'interno di body
. Dovrebbe esserci --fcc-expected--
elementi div
invece di --fcc-actual--
.
assert.equal(document.querySelectorAll('body > div')?.length, 3);
Dovresti dare all'elemento div
un attributo class
di left-mountain
.
assert.include(document.querySelector('body > div:not(.ground, .penguin)')?.className, 'left-mountain');
Dovresti inserire .left-mountain
prima di .penguin
.
assert.strictEqual(document.querySelector('.penguin')?.previousElementSibling, document.querySelector('.left-mountain'));
--seed--
--seed-contents--
<!DOCTYPE html>
<html>
<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>
body {
background: linear-gradient(45deg, rgb(118, 201, 255), rgb(247, 255, 222));
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
overflow: clip;
}
.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;
}