CSS border-top Özellik
Örnek
Farklı öğeler için üst kenarlığın stilini ayarlayın:
h1 {
border-top: 5px solid red;
}
h2 {
border-top: 4px dotted blue;
}
div {
border-top: double;
}
Tanım ve Kullanım
Shorthand özelliği , border-top
tüm üst sınır özelliklerini tek bir bildirimde ayarlar.
Ayarlanabilecek özellikler aşağıdaki sırada olmalıdır:
border-top-color atlanırsa, uygulanan renk metnin rengi olacaktır.
Varsayılan değer: | orta renk yok |
---|---|
Miras: | Hayır |
canlandırılabilir: | evet, bireysel özelliklere bakın . Canlandırılabilir hakkında bilgi edinin |
Sürüm: | CSS1 |
JavaScript sözdizimi: | nesne .style.borderTop="3px kesikli mavi" |
Tarayıcı Desteği
Tablodaki sayılar, özelliği tam olarak destekleyen ilk tarayıcı sürümünü belirtir.
Property | |||||
---|---|---|---|---|---|
border-top | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
CSS Sözdizimi
border-top: border-width border-style border-color|initial|inherit;
Mülk değerleri
Value | Description |
---|---|
border-top-width | Required. Specifies the width of the top border. Default value is "medium" |
border-top-style | Required. Specifies the style of the top border. Default value is "none" |
border-top-color | Optional. Specifies the color of the top 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 |
İlgili Sayfalar
CSS eğitimi: CSS Sınırı
HTML DOM referansı: borderTop özelliği