CSS border-top-style Свойство
Пример
Задайте стиль для верхней границы:
div {border-top-style: dotted;}
Подробнее примеры ниже.
Определение и использование
Свойство border-top-style
задает стиль верхней границы элемента.
Значение по умолчанию: | none |
---|---|
Inherited: | no |
Animatable: | no. Читайте о animatable |
Version: | CSS1 |
Синтаксис JavaScript: | object.style.borderTopStyle="dashed" |
Поддержка браузера
Номера в таблице указывают первую версию браузера, которая полностью поддерживает свойство.
Свойство | |||||
---|---|---|---|---|---|
border-top-style | 1.0 | 5.5 | 1.0 | 1.0 | 9.2 |
Синтаксис CSS
border-top-style: none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit;
Значения свойств
Значение | Описание | |
---|---|---|
none | Не указывает границы. Это значение по умолчанию | |
hidden | Так же, как "None", за исключением разрешения пограничного конфликта для элементов таблицы | |
dotted | Задает пунктирную границу | |
dashed | Задает пунктирную границу | |
solid | Задает сплошную границу | |
double | Задает двойную границу | |
groove | Задание трехмерной границы с канавкой. Эффект зависит от значения цвета границы | |
ridge | Задание трехмерной ребристой границы. Эффект зависит от значения цвета границы | |
inset | Задает 3D-вставку границы. Эффект зависит от значения цвета границы | |
outset | Задание трехмерной границы начала. Эффект зависит от значения цвета границы | |
initial | Присваивает этому свойству значение по умолчанию. (Читайте о initial) | |
inherit | Наследует это свойство из родительского элемента. (Читайте о inherit) |
Другие примеры
Пример
Пунктирная верхняя граница:
div {border-top-style: dashed;}
Пример
Сплошная верхняя граница:
div {border-top-style: solid;}
Пример
Двойная верхняя граница:
div {border-top-style: double;}
Пример
Удалите верхнюю границу:
div {border-top-style: none;}
Пример
Верхняя граница канавки:
div {
border-top-style: groove;
border-top-color: coral;
border-top-width: 7px;
}
Пример
Верхняя граница хребта:
div {
border-top-style: ridge;
border-top-color: coral;
border-top-width: 7px;
}
Пример
Верхняя граница вставки:
div {
border-top-style: inset;
border-top-color: coral;
border-top-width: 7px;
}
Пример
Верхняя граница начала:
div {
border-top-style: outset;
border-top-color: coral;
border-top-width: 7px;
}
Похожие страницы
CSS Справочник: CSS Border
CSS Справка: border-top Свойство
HTML DOM Справочник: borderTopStyle Свойство