freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-bui.../619692ff79f5770fc6d8c0b4.md

1.5 KiB

id title challengeType dashedName
619692ff79f5770fc6d8c0b4 Step 10 0 step-10

--description--

Sopra l'elemento .ground aggiungi un elemento div con un attributo class di penguin. Questo div conterrà il pinguino che saluta.

--hints--

Dovresti aggiungere un nuovo div all'interno di body.

assert.equal(document.querySelectorAll('body > div')?.length, 2);

Dovresti dare al div un attributo class con il valore penguin.

assert.include(document.querySelector('body > div:not(.ground)')?.className, 'penguin');

Dovresti posizionare div.penguin prima di div.ground.

assert.strictEqual(document.querySelector('.ground')?.previousElementSibling, document.querySelector('.penguin'));

--seed--

--seed-contents--

<!DOCTYPE html>
<html>

  <head>
    <meta charset="UTF-8" />
    <link rel="stylesheet" type="text/css" href="./styles.css" />
    <title>Penguin</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>

--fcc-editable-region--
  <body>

    <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;
}

.ground {
  width: 100vw;
  height: 400px;
  background: linear-gradient(90deg, rgb(88, 175, 236), rgb(182, 255, 255));
  z-index: 3;
  position: absolute;
}