1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
---
title: outline-color
slug: Web/CSS/outline-color
tags:
- Contorno CSS
- Propiedad CSS
translation_of: Web/CSS/outline-color
---
<div><span style="line-height: 1.5;">{{CSSRef}}</span></div>
<h2 id="Resumen">Resumen</h2>
<p>La propiedad CSS <strong><code>outline-color</code></strong> establece el color del contorno de un elemento. Un contorno es una línea que se dibuja al rededor de los elementos, fuera de los límites del borde, para resaltar al elemento.</p>
<p>{{cssinfo}}</p>
<h2 id="Sintaxis">Sintaxis</h2>
<pre class="brush:css">/* Valores clave */
outline-color: invert;
outline-color: red;
/* Valores globales */
outline-color: inherit;
outline-color: initial;
outline-color: unset;
</pre>
<h3 id="Valores">Valores</h3>
<dl>
<dt><code><color></code></dt>
<dd>Ver {{cssxref("<color>")}} para las diferentes palabras clave y notaciones de colores.</dd>
<dt><code>invert</code></dt>
<dd>Para asegurarse que el contorno es visible, este valor realiza una inversión del color de fondo. Esto hace el contorno más sobresaliente, sin importar el color de fondo. Nótese que los navegadores pueden no soportar este valor. De ser así, solamente considerarán la declaración como inválida</dd>
</dl>
<h3 id="Sintaxis_formal">Sintaxis formal</h3>
{{csssyntax}}
<h2 id="Ejemplo">Ejemplo</h2>
<h3 id="HTML">HTML</h3>
<pre class="brush: html;"><p class="example">My outline is blue, da ba dee.</p></pre>
<h3 id="CSS">CSS</h3>
<pre class="brush: css; highlight:[3]">.example {
/* primero debe definirse la propiedad "outline" */
outline: 2px solid;
/* hacer el contorno azul */
outline-color: #0000FF;
}</pre>
<h3 id="En_vivo">En vivo:</h3>
<p>{{ EmbedLiveSample('Example', '', '', '', 'Web/CSS/outline-color') }}</p>
<h2 id="Especificaciones">Especificaciones</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Especificación</th>
<th scope="col">Estado</th>
<th scope="col">Comentarios</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('CSS3 Basic UI', '#outline-color', 'outline-color')}}</td>
<td>{{Spec2('CSS3 Basic UI')}}</td>
<td>Sin cambios</td>
</tr>
<tr>
<td>{{SpecName('CSS3 Transitions', '#animatable-css', 'outline-color')}}</td>
<td>{{Spec2('CSS3 Transitions')}}</td>
<td>Define <code>outline-color</code> como propiedad que se puede animar.</td>
</tr>
<tr>
<td>{{SpecName('CSS2.1', 'ui.html#propdef-outline-color', 'outline-color')}}</td>
<td>{{Spec2('CSS2.1')}}</td>
<td>Definición inicial</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">Compatibilidad de navegadores</h2>
{{Compat("css.properties.outline-color")}}
|