freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-basic-css-by-building.../5f356ed60a5decd94ab66986.md

1.4 KiB

id title challengeType removeComments dashedName
5f356ed60a5decd94ab66986 Step 22 0 false step-22

--description--

I commenti in CSS hanno quest'aspetto:

/* comment here */

Nel foglio di stile, trasforma in un commento la riga contenente la proprietà background-color e il suo valore, in modo da poter vedere l'effetto dello stile del solo elemento div. In questo modo lo sfondo tornerà bianco di nuovo.

--hints--

Dovresti trasformare in un commento la riga background-color: burlywood; del CSS.

assert(code.match(/\/\*\s*background-color:\s*burlywood;?\s*\*\//i));

L'elemento body dovrebbe avere uno sfondo bianco.

const bodyCSS = $('body').css('background-color');
assert(bodyCSS === "rgba(0, 0, 0, 0)")

--seed--

--seed-contents--

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Cafe Menu</title>
    <link href="styles.css" rel="stylesheet"/>
  </head>
  <body>
    <div>
      <main>
        <h1>CAMPER CAFE</h1>
        <p>Est. 2020</p>
        <section>
          <h2>Coffee</h2>
        </section>
      </main>
    </div>
  </body>
</html>
body {
--fcc-editable-region--
  background-color: burlywood;
--fcc-editable-region--
}

h1, h2, p {
  text-align: center;
}

div {
  width: 300px;
}