--- title: border-bottom slug: Web/CSS/border-bottom translation_of: Web/CSS/border-bottom ---
Сокращённое свойство CSS border-bottom описывает нижнюю границу элемента border. Оно устанавливает значения {{cssxref("border-bottom-width")}}, {{cssxref("border-bottom-style")}} и {{cssxref("border-bottom-color")}}.
Как и все сокращённые свойства, border-bottom устанавливает значения всех свойств, которые он может установить, даже если они не указаны. Для тех свойств, которые не указаны оно устанавливает значения по умолчанию. Это означает, что ...
border-bottom-style: dotted; border-bottom: thick green;
... это то же самое, что ...
border-bottom-style: dotted; border-bottom: none thick green;
... и значение {{cssxref("border-bottom-style")}}, указанное перед border-bottom игнорируется. Поскольку значением по умолчанию для {{cssxref("border-bottom-style")}} является none, то без указания border-style граница не будет показана.
This property is a shorthand for the following CSS properties:
border-bottom: 1px; border-bottom: 2px dotted; border-bottom: medium dashed blue;
The three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
<br-width><br-style>{{CSSInfo}}
<div> This box has a border on the bottom side. </div>
div {
border-bottom: 4px dashed blue;
background-color: gold;
height: 100px;
width: 100px;
font-weight: bold;
text-align: center;
}
{{EmbedLiveSample('Applying_a_bottom_border')}}
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('CSS3 Backgrounds', '#propdef-border-bottom', 'border-bottom')}} | {{Spec2('CSS3 Backgrounds')}} | No direct changes, though the modification of values for the {{cssxref("border-bottom-color")}} do apply to it. |
| {{SpecName('CSS2.1', 'box.html#propdef-border-bottom', 'border-bottom')}} | {{Spec2('CSS2.1')}} | No significant changes. |
| {{SpecName('CSS1', '#border-bottom', 'border-bottom')}} | {{Spec2('CSS1')}} | Initial definition |
{{Compat}}