Меню
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON PHP КАК СДЕЛАТЬ
     ❯   

CSS Справочники


CSS Свойства





text-decoration



Example

Set different text decorations for <h1>, <h2>, and <b> elements:

h1 {
  text-decoration: overline;
}

h2 {
  text-decoration: line-through;
}

b {
  text-decoration: underline;
}

h4 {
  text-decoration: underline overline;
}
Try it Yourself »

Definition text-decoration

Подработка: Перевод страницы

The text-decoration property specifies the decoration added to text, and is a shorthand property for:

  • text-decoration-line (required)
  • text-decoration-color
  • text-decoration-style
  • text-decoration-thickness

Show demo ❯

Default value: none currentColor solid auto
Inherited: no
Animatable: no, see individual properties. Read about animatable
Version: CSS1, renewed in CSS3
JavaScript syntax: object.style.textDecoration="underline" Try it

Browser Support text-decoration

The numbers in the table specify the first browser version that fully supports the property.

Property
text-decoration 1.0 3.0 1.0 1.0 3.5


CSS Syntax text-decoration

text-decoration: text-decoration-line text-decoration-color text-decoration-style text-decoration-thickness|initial|inherit;

Property Values text-decoration

Value Description Demo
text-decoration-line Sets the kind of text decoration to use (like underline, overline, line-through) Demo ❯
text-decoration-color Sets the color of the text decoration Demo ❯
text-decoration-style Sets the style of the text decoration (like solid, wavy, dotted, dashed, double) Demo ❯
text-decoration-thickness Sets the thickness of the decoration line
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

More Examples text-decoration

Example

Add more text decoration:

h1 {
  text-decoration: underline overline dotted red;
}

h2 {
  text-decoration: underline wavy blue 5px;
}
Try it Yourself »

Related Pages text-decoration

CSS tutorial: CSS Text Decoration

HTML DOM reference: textDecoration property



×

Связаться с отделом продаж

Если вы хотите использовать услуги schoolsw3 как образовательное учреждение, команда или предприятие, отправьте нам электронное письмо:
sales@schoolsw3.com

Сообщить об ошибке

Если вы хотите сообщить об ошибке или внести предложение, отправьте нам электронное письмо:
help@schoolsw3.com

Schoolsw3 оптимизирован для обучения и подготовки. Примеры могут быть упрощены для улучшения чтения и обучения. Учебники, ссылки и примеры постоянно проверяются, чтобы избежать ошибок, но мы не можем гарантировать полную правильность всего контента.
При использовании Schoolsw3 вы соглашаетесь прочитать и принять наши условия использования,
политику использования файлов cookie и конфиденциальности.

Авторское право 1999- © Copyright. Все права защищены. Schoolsw3 работает на SW3.CSS.