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

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


CSS Свойства





outline



Example

Set an outline around a <h2> element and a <div> element:

h2 {
  outline: 5px dotted green;
}

div.a {
  outline: 2px dashed blue;
}
Try it Yourself »

Definition outline

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

An outline is a line that is drawn around elements, outside the borders, to make the element "stand out".

The outline property is a shorthand property for:

If outline-color is omitted, the color applied will be the color of the text.

Note: Outlines differ from borders! Unlike border, the outline is drawn outside the element's border, and may overlap other content. Also, the outline is NOT a part of the element's dimensions; the element's total width and height is not affected by the width of the outline.

Show demo ❯

Default value: medium invert color
Inherited: no
Animatable: yes, see individual properties. Read about animatable Try it
Version: CSS2
JavaScript syntax: object.style.outline="#0000FF dotted 5px" Try it

Browser Support outline

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

Property
outline 1.0 8.0 1.5 1.2 7.0


CSS Syntax outline

outline: outline-width outline-style outline-color|initial|inherit;

Property Values outline

Value Description Demo
outline-width Specifies the width of outline Try it »
outline-style Specifies the style of the outline Try it »
outline-color Specifies the color of the outline Try it »
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Related Pages outline

CSS tutorial: CSS Outline

HTML DOM reference: outline property



×

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

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

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

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

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

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