1.5 KiB
1.5 KiB
id | title | challengeType | dashedName |
---|---|---|---|
5d822fd413a79914d39e98d2 | Step 10 | 0 | step-10 |
--description--
Annida un div
con la classe bb1
nell'elemento background buildings. Apri il file styles.css
, e assegna a .bb1
una proprietà width
del 10%
e una proprietà height
del 70%
. "bb" sta per "background buildings", e questo sarà il tuo primo edificio.
--hints--
Dovresti creare un nuovo elemento div
.
assert.equal(document.querySelectorAll('div').length, 2);
Dovresti dare al nuovo div
la classe bb1
.
assert.exists(document.querySelector('div.bb1'));
Dovresti usare un selettore di classe .bb1
per lo stile dell'elemento.
assert.exists(new __helpers.CSSHelp(document).getStyle('.bb1'));
Dovresti dare all'elemento .bb1
una proprietà width
del 10%
.
assert.equal(new __helpers.CSSHelp(document).getStyle('.bb1')?.width, '10%');
Dovresti dare all'elemento .bb1
una proprietà height
del 70%
.
assert.equal(new __helpers.CSSHelp(document).getStyle('.bb1')?.height, '70%');
--seed--
--seed-contents--
<!DOCTYPE html>
<html>
<head>
<title>City Skyline</title>
<link href="styles.css" rel="stylesheet" />
</head>
<body>
--fcc-editable-region--
<div class="background-buildings"></div>
--fcc-editable-region--
</body>
</html>
* {
border: 1px solid black;
box-sizing: border-box;
}
body {
height: 100vh;
margin: 0;
overflow: hidden;
}
.background-buildings {
width: 100%;
height: 100%;
}