CSS border-right Property
Przykład
Ustaw styl prawej krawędzi dla różnych elementów:
h1 {
border-right: 5px solid red;
}
h2 {
border-right: 4px dotted blue;
}
div {
border-right: double;
}
Definicja i użycie
Właściwość border-right
jest skróconą własnością (w następującej kolejności):
Jeśli pominięto border-right-color, zastosowany kolor będzie kolorem tekstu.
Domyślna wartość: | średni brak koloru |
---|---|
Dziedziczny: | nie |
Animowalny: | tak, zobacz poszczególne właściwości . Przeczytaj o animacji |
Wersja: | CSS1 |
Składnia JavaScript: | object .style.borderRight="5px kropkowana niebieska" |
Obsługa przeglądarki
Liczby w tabeli określają pierwszą wersję przeglądarki, która w pełni obsługuje tę właściwość.
Property | |||||
---|---|---|---|---|---|
border-right | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Składnia CSS
border-right: border-width border-style border-color|initial|inherit;
Wartości nieruchomości
Value | Description |
---|---|
border-right-width | Required. Specifies the width of the right border. Default value is "medium" |
border-right-style | Required. Specifies the style of the right border. Default value is "none" |
border-right-color | Optional. Specifies the color of the right 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 |
Powiązane strony
Samouczek CSS: obramowanie CSS
Odniesienie HTML DOM: własność borderRight