Proprietà CSS in stile bordo superiore
Esempio
Imposta uno stile per il bordo superiore:
div {border-top-style: dotted;}
Altri esempi "Provalo da solo" di seguito.
Definizione e utilizzo
La border-top-style
proprietà imposta lo stile del bordo superiore di un elemento.
Valore di default: | nessuno |
---|---|
Ereditato: | no |
Animabile: | no. Leggi su animabile |
Versione: | CSS1 |
sintassi JavaScript: | oggetto .style.borderTopStyle="tratteggiato" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
border-top-style | 1.0 | 5.5 | 1.0 | 1.0 | 9.2 |
Sintassi CSS
border-top-style: none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit;
Valori di proprietà
Value | Description | Play it |
---|---|---|
none | Specifies no border. This is default | |
hidden | The same as "none", except in border conflict resolution for table elements | |
dotted | Specifies a dotted border | |
dashed | Specifies a dashed border | |
solid | Specifies a solid border | |
double | Specifies a double border | |
groove | Specifies a 3D grooved border. The effect depends on the border-color value | |
ridge | Specifies a 3D ridged border. The effect depends on the border-color value | |
inset | Specifies a 3D inset border. The effect depends on the border-color value | |
outset | Specifies a 3D outset border. The effect depends on the border-color value | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Altri esempi
Esempio
Un bordo superiore tratteggiato:
div {border-top-style: dashed;}
Esempio
Un bordo superiore solido:
div {border-top-style: solid;}
Esempio
Un doppio bordo superiore:
div {border-top-style: double;}
Esempio
Rimuovi il bordo superiore:
div {border-top-style: none;}
Esempio
Un bordo superiore della scanalatura:
div {
border-top-style: groove;
border-top-color: coral;
border-top-width: 7px;
}
Esempio
Un bordo superiore di cresta:
div {
border-top-style: ridge;
border-top-color: coral;
border-top-width: 7px;
}
Esempio
Un bordo superiore inserito:
div {
border-top-style: inset;
border-top-color: coral;
border-top-width: 7px;
}
Esempio
Un bordo superiore iniziale:
div {
border-top-style: outset;
border-top-color: coral;
border-top-width: 7px;
}
Pagine correlate
Tutorial CSS: Bordo CSS
Riferimento CSS: proprietà border-top
Riferimento HTML DOM: proprietà borderTopStyle