freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-variables-by-buil.../5d822fd413a79914d39e98d1.md

69 lines
1.3 KiB
Markdown
Raw Normal View History

---
id: 5d822fd413a79914d39e98d1
title: Step 9
challengeType: 0
dashedName: step-9
---
# --description--
Dai all'elemento `.background-buildings` delle proprietà `width` e `height` del `100%` in modo da renderlo della stessa larghezza e altezza del suo genitore, il `body`.
# --hints--
Dovresti usare la classe `background-buildings` per selezionare l'elemento corretto.
```js
assert.exists(new __helpers.CSSHelp(document).getStyle('.background-buildings'));
```
L'elemento `.background-buildings` dovrebbe avere una proprietà `width` del `100%`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('.background-buildings')?.width, '100%');
```
L'elemento `.background-buildings` dovrebbe avere una proprietà `height` del `100%`.
```js
assert.equal(new __helpers.CSSHelp(document).getStyle('.background-buildings')?.height, '100%');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>City Skyline</title>
<link href="styles.css" rel="stylesheet" />
</head>
<body>
<div class="background-buildings"></div>
</body>
</html>
```
```css
* {
border: 1px solid black;
box-sizing: border-box;
}
body {
height: 100vh;
margin: 0;
overflow: hidden;
}
--fcc-editable-region--
--fcc-editable-region--
```