Files
2022-04-02 17:46:30 +09:00

1.3 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
60a3e3396c7b40068ad6997a Step 17 0 step-17

--description--

Scrivi una nuova regola che seleziona .one e imposta la sua width a 425 pixel.

--hints--

Dovresti avere un selettore .one.

const hasOne = new __helpers.CSSHelp(document).getStyle('.one');
assert(hasOne);

Dovresti impostare la proprietà width su 425px.

const hasWidth = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.width === '425px');
assert(hasWidth);

Il tuo elemento .one dovrebbe avere un valore width di 425px.

const oneWidth = new __helpers.CSSHelp(document).getStyle('.one')?.getPropertyValue('width');
assert(oneWidth === '425px');

--seed--

--seed-contents--

.canvas {
  width: 500px;
  height: 600px;
  background-color: #4d0f00;
}

.frame {
  border: 50px solid black;
  width: 500px;
  padding: 50px;
  margin: 20px auto;
}
--fcc-editable-region--

--fcc-editable-region--

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Rothko Painting</title>
    <link href="./styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="frame">
      <div class="canvas">
        <div class="one"></div>
      </div>
    </div>
  </body>
</html>