Atrybut border-bottom-color CSS
- poprzednia strona border-bottom
- następna strona border-bottom-left-radius
Definition and usage
border-bottom-color sets the color of the bottom border of the element.
Only pure colors can be defined, and the border can only appear when the border style is not none or hidden.
Komentarz:Always declare the border-style attribute before the border-color attribute. The element must have a border before you change its color.
See also:
CSS Tutorial:Pasek w CSS
CSS Reference Manual:border-bottom attribute
HTML DOM Reference Manual:borderBottomColor attribute
Example
Set the color of the bottom border:
p { border-style:solid; border-bottom-color:#ff0000; }
CSS syntax
border-bottom-color: color|transparent|initial|inherit;
Attribute value
Value | Description |
---|---|
color_name | Specify the border color as a color name (e.g., red). |
hex_number | Specify the border color as a hexadecimal value (e.g., #ff0000). |
rgb_number | Specify the border color as an rgb code (e.g., rgb(255,0,0)). |
transparent | Default value. The border color is transparent. |
inherit | Specify that the border color should be inherited from the parent element. |
Technical details
Default value: | not specified |
---|---|
Inheritance: | no |
Version: | CSS1 |
JavaScript syntax: | object.style.borderBottomColor="blue" |
Więcej przykładów
- Ustawienie koloru dolnej krawędzi
- Ten przykład pokazuje, jak ustawić kolor dolnej krawędzi.
Obsługa przeglądarek
Liczby w tabeli wskazują pierwszą wersję przeglądarki, która obsługuje pełną funkcjonalność tego atrybutu.
Chrome | IE / Edge | Firefox | Safari | Opera |
---|---|---|---|---|
1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Komentarz:Przeglądarka Internet Explorer 6 (i wcześniejsze wersje) nie obsługuje wartości atrybutu "transparent".
Komentarz:Przeglądarki Internet Explorer 7 i wcześniejsze nie obsługują wartości "inherit". Internet Explorer 8 wymaga !DOCTYPE. Internet Explorer 9 obsługuje "inherit".
- poprzednia strona border-bottom
- następna strona border-bottom-left-radius