You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2-ui/1-document/09-size-and-scroll/article.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Dimensioni dell'elemento e scorrimento
2
2
3
-
Ci sono molte proprietà JavaScript che ci consentono di leggere informazioni circa la larghezzadi un elemento, l'altezza e le altre caratteristiche geometriche.
3
+
Ci sono molte proprietà JavaScript che ci consentono di leggere informazioni circa la larghezza, l'altezza di un elemento e le altre caratteristiche geometriche.
4
4
5
5
Spesso ne abbiamo bisogno quando spostiamo o posizioniamo gli elementi in JavaScript.
6
6
@@ -23,31 +23,31 @@ Useremo l'elemento indicato a seguire come esempio di tali proprietà:
23
23
</style>
24
24
```
25
25
26
-
It has the border, padding and scrolling. The full set of features. There are no margins, as they are not the part of the element itself, and there are no special properties for them.
26
+
Questo elemento possiede bordi, padding e barra di scorrimento: l'intero insieme delle proprietà. Non ci sono margini, in quanto questi non fanno parte dell'elemento stesso, e non ci sono proprietà speciali.
27
27
28
-
The element looks like this:
28
+
L'elemento ha questo aspetto:
29
29
30
30

31
31
32
-
You can [open the document in the sandbox](sandbox:metric).
32
+
Potete [visualizzare il documento nella sandbox](sandbox:metric).
33
33
34
-
```smart header="Mind the scrollbar"
35
-
The picture above demonstrates the most complex case when the element has a scrollbar. Some browsers (not all) reserve the space for it by taking it from the content (labeled as "content width" above).
34
+
```smart header="Prestate attenzione alla barra di scorrimento"
35
+
L'immagine sopra rappresenta il caso più complesso in cui l'elemento ha una barra di scorrimento. Alcuni browser (non tutti) ricavano lo spazio per la barra prendendolo dall'area del contenuto (indicata sopra come "content width").
36
36
37
-
So, without scrollbar the content width would be `300px`, but if the scrollbar is `16px` wide (the width may vary between devices and browsers) then only `300 - 16 = 284px` remains, and we should take it into account. That's why examples from this chapter assume that there's a scrollbar. Without it, some calculations are simpler.
37
+
Senza la barra di scorrimento, pertanto, l'area del contenuto sarebbe `300px`, ma se la barra di scorrimento è larga `16px` (la larghezza è variabile in base al dispositivo ed al browser) allora rimane soltanto `300 - 16 = 284px`, ed è questa la misura che dovremmo tenere in considerazione. Ecco perché gli esempi di questo capitolo presumono che ci sia una barra di scorrimento. Senza questa, alcuni calcoli sono più semplici.
38
38
```
39
39
40
-
```smart header="The `padding-bottom`area may be filled with text"
41
-
Usually paddings are shown empty on our illustrations, but if there's a lot of text in the element and it overflows, then browsers show the "overflowing" text at`padding-bottom`, that's normal.
40
+
```smart header="L'area del `padding-bottom`può essere riempita dal testo"
41
+
Di solito gli spazi definiti dai padding sono rappresentati vuoti nelle immagini, ma se c'è molto testo nell'elemento ed eccede l'area del contenuto, in quel caso è normale che il browser mostri il testo eccedente nel`padding-bottom`.
42
42
```
43
43
44
-
## Geometry
44
+
## Proprietà geometriche
45
45
46
-
Here's the overall picture with geometry properties:
46
+
Ecco un'immagine riassuntiva delle proprietà geometriche:
47
47
48
48

49
49
50
-
Values of these properties are technically numbers, but these numbers are "of pixels", so these are pixel measurements.
50
+
I valori di tali proprietà sono tecnicamente numerici, ma questi numeri sono pixel, quindi si tratta delle dimensioni in pixel.
51
51
52
52
Let's start exploring the properties starting from the outside of the element.
0 commit comments