Revision 25646 of outline-style

  • Revision slug: CSS/outline-style
  • Revision title: outline-style
  • Revision id: 25646
  • Created:
  • Creator: grendel
  • Is current revision? No
  • Comment Removed old browser compatibility table.; 24 words removed

Revision Content

{{ CSSRef() }}

Summary

The outline-style CSS property is used to set the style of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out.

It is often more convenient to use the shortcut property {{ cssxref("outline") }} instead of outline-style, outline-width and outline-color.

  • {{ Xref_cssinitial() }}: {{ Cssxref("none") }}
  • Applies to: all elements
  • {{ Xref_cssinherited() }}: no
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: specified value

In browsers prior to Gecko 1.8 (Firefox 1.5) this effect can be achieved using Mozilla CSS Extension {{ Cssxref("-moz-outline-style") }}.

Syntax

outline-style:  auto | <border-style> | inherit

Values

<border-style> can be any of the following:

none
No outline ({{ Cssxref("outline-width") }} is 0).
dotted
The outline is a series of dots.
dashed
The outline is a series of short line segments.
solid
The outline is a single line.
double
The outline is two single lines. The {{ Cssxref("outline-width") }} is the sum of the two lines and the space between them.
groove
The outline looks as though it were carved into the canvas.
ridge
The opposite of groove: the outline looks as though it were coming out of the canvas.
inset
The outline makes the box look as though it were embeded in the canvas.
outset
The opposite of inset: the outline makes the box look as though it were coming out of the canvas.

Examples

.example {  /* make the outline a 3D groove style */
 
            outline-style: groove;        /* same result as "outline: groove" */ 
}

Browser compatibility

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support   1.5 (1.8) 8.0 7.0 1.2 (125)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

Specifications

See {{ Cssxref("outline") }} property

See also

{{ CSS_Reference:Outline() }}

Revision Source

<p>{{ CSSRef() }}</p>
<h3>Summary</h3>
<p>The<code> outline-style </code>CSS property is used to set the style of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out.</p>
<p>It is often more convenient to use the shortcut property {{ cssxref("outline") }} instead of<code> outline-style</code>,<code> outline-width </code>and<code> outline-color</code>.</p>
<ul> <li>{{ Xref_cssinitial() }}: {{ Cssxref("none") }}</li> <li>Applies to: all elements</li> <li>{{ Xref_cssinherited() }}: no</li> <li>Media: {{ Xref_cssvisual() }}</li> <li>{{ Xref_csscomputed() }}: specified value</li>
</ul>
<p>In browsers prior to <a href="/en/Gecko" title="en/Gecko">Gecko</a> 1.8 (<a href="/en/Firefox_1.5_for_developers" title="en/Firefox_1.5_for_developers">Firefox 1.5</a>) this effect can be achieved using <a href="/en/CSS_Reference/Mozilla_Extensions" title="en/CSS_Reference/Mozilla_Extensions">Mozilla CSS Extension</a> {{ Cssxref("-moz-outline-style") }}.</p>
<h3>Syntax</h3>
<pre>outline-style:  auto | &lt;border-style&gt; | inherit
</pre>
<h3>Values</h3>
<p><code>&lt;border-style&gt; </code>can be any of the following:</p>
<dl> <dt>none</dt> <dd>No outline ({{ Cssxref("outline-width") }} is<code> 0</code>).</dd> <dt>dotted</dt> <dd style="outline:dotted">The outline is a series of dots.</dd> <dt>dashed</dt> <dd style="outline:dashed">The outline is a series of short line segments.</dd> <dt>solid</dt> <dd style="outline:solid">The outline is a single line.</dd> <dt>double</dt> <dd style="outline:double">The outline is two single lines. The {{ Cssxref("outline-width") }} is the sum of the two lines and the space between them.</dd> <dt>groove</dt> <dd style="outline:groove">The outline looks as though it were carved into the canvas.</dd> <dt>ridge</dt> <dd style="outline:ridge">The opposite of<code> groove</code>: the outline looks as though it were coming out of the canvas.</dd> <dt>inset</dt> <dd style="outline:inset">The outline makes the box look as though it were embeded in the canvas.</dd> <dt>outset</dt> <dd style="outline:outset">The opposite of<code> inset</code>: the outline makes the box look as though it were coming out of the canvas.</dd>
</dl>
<h3>Examples</h3>
<pre>.example {  /* make the outline a 3D groove style */
 
            outline-style: groove;        /* same result as "outline: groove" */ 
}
</pre>
<h3>Browser compatibility</h3>
<h3 name="Browser_Compatibility">Browser compatibility</h3>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari (WebKit)</th> </tr> <tr> <td>Basic support</td> <td> </td> <td>1.5 (1.8)</td> <td>8.0</td> <td>7.0</td> <td>1.2 (125)</td> </tr> </tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Phone</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody>
</table>
</div>
<h3>Specifications</h3>
<p>See {{ Cssxref("outline") }} property</p>
<h3>See also</h3>
<p>{{ CSS_Reference:Outline() }}</p>
Revert to this revision