61 lines
1.1 KiB
Markdown
61 lines
1.1 KiB
Markdown
|
---
|
||
|
id: 5d822fd413a79914d39e98ce
|
||
|
title: Step 6
|
||
|
challengeType: 0
|
||
|
dashedName: step-6
|
||
|
---
|
||
|
|
||
|
# --description--
|
||
|
|
||
|
Imposta anche `box-sizing` su `border-box` per tutti gli elementi. In questo modo, il bordo che hai aggiunto non aumenterà la dimensione degli elementi.
|
||
|
|
||
|
# --hints--
|
||
|
|
||
|
Dovresti usare la proprietà `box-sizing`.
|
||
|
|
||
|
```js
|
||
|
assert(new __helpers.CSSHelp(document).isPropertyUsed('box-sizing'));
|
||
|
```
|
||
|
|
||
|
Dovresti utilizzare il selettore `*` esistente.
|
||
|
|
||
|
```js
|
||
|
// Two selectors create two CSSStyleRule objects
|
||
|
assert.equal(new __helpers.CSSHelp(document).getStyleDeclarations('*').length, 1);
|
||
|
```
|
||
|
|
||
|
Tutti gli elementi dovrebbero avere una proprietà `box-sizing` con il valore `border-box`.
|
||
|
|
||
|
```js
|
||
|
const astStyles = new __helpers.CSSHelp(document).getStyle('*');
|
||
|
assert.equal(astStyles.boxSizing, 'border-box');
|
||
|
```
|
||
|
|
||
|
# --seed--
|
||
|
|
||
|
## --seed-contents--
|
||
|
|
||
|
```html
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>City Skyline</title>
|
||
|
<link href="styles.css" rel="stylesheet" type="text/css" />
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
</body>
|
||
|
</html>
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
--fcc-editable-region--
|
||
|
* {
|
||
|
border: 1px solid black;
|
||
|
}
|
||
|
|
||
|
--fcc-editable-region--
|
||
|
|
||
|
```
|
||
|
|