CSS -grens-onder eiendom
Voorbeeld
Stel die styl van die onderste rand vir verskillende elemente:
h1 {
border-bottom: 5px solid red;
}
h2 {
border-bottom: 4px dotted blue;
}
div {
border-bottom: double;
}
Definisie en gebruik
Die border-bottom
eiendom is 'n snelskrif-eiendom vir (in die volgende volgorde):
As grens-onder-kleur weggelaat word, sal die kleur wat toegepas word die kleur van die teks wees.
Standaard waarde: | medium geen kleur nie |
---|---|
Geërf: | geen |
Animateerbaar: | ja, sien individuele eiendomme . Lees oor animeerbaar |
Weergawe: | CSS1 |
JavaScript-sintaksis: | voorwerp .style.borderBottom="15px stippelligblou" |
Blaaierondersteuning
Die nommers in die tabel spesifiseer die eerste blaaierweergawe wat die eiendom ten volle ondersteun.
Property | |||||
---|---|---|---|---|---|
border-bottom | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
CSS-sintaksis
border-bottom: border-width border-style border-color|initial|inherit;
Eiendomswaardes
Value | Description |
---|---|
border-bottom-width | Required. Specifies the width of the bottom border. Default value is "medium" |
border-bottom-style | Required. Specifies the style of the bottom border. Default value is "none" |
border-bottom-color | Optional. Specifies the color of the bottom border. Default value is the color of the text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Verwante bladsye
CSS handleiding: CSS Border
HTML DOM verwysing: borderBottom eiendom