diff options
Diffstat (limited to 'files/es/web/css/outline-style')
-rw-r--r-- | files/es/web/css/outline-style/index.html | 263 |
1 files changed, 263 insertions, 0 deletions
diff --git a/files/es/web/css/outline-style/index.html b/files/es/web/css/outline-style/index.html new file mode 100644 index 0000000000..68b1f9abd4 --- /dev/null +++ b/files/es/web/css/outline-style/index.html @@ -0,0 +1,263 @@ +--- +title: outline-style +slug: Web/CSS/outline-style +tags: + - Contorno CSS + - Propiedad CSS +translation_of: Web/CSS/outline-style +--- +<div>{{CSSRef}}</div> + +<h2 id="Resumen">Resumen</h2> + +<p>La propiedad CSS <strong><code>outline-style</code></strong> es usada para establecer el estilo del contorno de un elemento. Un contorno es una línea que se dibuja al rededor de elementos, fuera de los límites del borde, para resaltar un elemento.</p> + +<p>Por lo general, es más conveniente usar la propiedad de forma reducida {{cssxref("outline")}} en vez de<code> outline-style</code>,<code> outline-width </code>y<code> outline-color</code> por separado.</p> + +<p>{{cssinfo}}</p> + +<h2 id="Sintaxis">Sintaxis</h2> + +<pre class="brush:css">/* Valores clave */ +outline-style: auto; +outline-style: none; +outline-style: dotted; +outline-style: dashed; +outline-style: solid; +outline-style: double; +outline-style: groove; +outline-style: ridge; +outline-style: inset; +outline-style: outset; + +/* Valores globales */ +outline-style: inherit; +outline-style: initial; +outline-style: unset; +</pre> + +<h2 id="Valores">Valores</h2> + +<p><code><br-style> </code>puede ser uno de los siguientes:</p> + +<dl> + <dt>none</dt> + <br> + <dd>Sin contorno ({{Cssxref("outline-width")}} es<code> 0</code>).</dd> + <dt>dotted</dt> + <br> + <dd style="outline: 10px dotted red;">Línea punteada. El contorno es una serie de puntos.</dd> + <dt>dashed</dt> + <br> + <dd style="outline: 10px dashed red;">Línea discontinua. El contorno es una serie de segmentos de línea cortos.</dd> + <dt>solid</dt> + <br> + <dd style="outline: 10px solid red;">El contorno es una línea simple.</dd> + <dt>double</dt> + <br> + <dd style="outline: 10px double red;">El contorno son dos líneas paralelas. El valor de {{Cssxref("outline-width")}} es la suma de los dos líneas y el espacio entre ellas.</dd> + <dt>groove</dt> + <br> + <dd style="outline: 10px groove red;">El contorno parece estar tallado dentro del lienzo.</dd> + <dt>ridge</dt> + <br> + <dd style="outline: 10px ridge red;">Lo opuesto a <code> groove</code>: el contorno parece salir del lienzo.</dd> + <dt>inset</dt> + <br> + <dd style="outline: 10px inset red;">El contorno hace a la caja verse como si estuviera embedida dentro del lienzo.</dd> + <dt>outset</dt> + <br> + <dd style="outline: 10px outset red;">Lo opuesto a <code> inset</code>: el contorno hace a la caja verse como si estuviera saliendo del lienzo.</dd> +</dl> + +<h3 id="Sintaxis_formal">Sintaxis formal</h3> + +<pre class="syntaxbox">{{csssyntax}}</pre> + +<h2 id="Example_1_-_dotted_and_dashed" name="Example_1_-_dotted_and_dashed">Ejemplo 1 - <code>dotted</code> y <code>dashed</code></h2> + +<h3 id="HTML">HTML</h3> + +<pre class="brush: html"><div> + <div class="dotted"> + <p class="dashed">Outline Demo</p> + </div> +</div> </pre> + +<h3 id="CSS">CSS</h3> + +<pre class="brush: css">.dotted { + outline-style: dotted; /* same result as "outline: dotted" */ +} +.dashed { + outline-style: dashed; +} + +/* To make the Demo clearer */ +* { outline-width: 10px; padding: 15px; } </pre> + +<p>{{ EmbedLiveSample('Example_1_-_dotted_and_dashed') }}</p> + +<h2 id="Example_2_-_solid_and_double" name="Example_2_-_solid_and_double">Ejemplo 2 - <code>solid</code> y <code>double</code></h2> + +<h3 id="HTML_2">HTML</h3> + +<pre class="brush: html"><div> + <div class="solid"> + <p class="double">Outline Demo</p> + </div> +</div> </pre> + +<h3 id="CSS_2">CSS</h3> + +<pre class="brush: css">.solid { + outline-style: solid; +} +.double { + outline-style: double; +} + +/* To make the Demo clearer */ +* { outline-width: 10px; padding: 15px; } </pre> + +<p>{{ EmbedLiveSample('Example_2_-_solid_and_double') }}</p> + +<h2 id="Example_3_-_groove_and_ridge" name="Example_3_-_groove_and_ridge">Ejemplo 3 - <code>groove</code> y <code>ridge</code></h2> + +<h3 id="HTML_3">HTML</h3> + +<pre class="brush: html"><div> + <div class="groove"> + <p class="ridge">Outline Demo</p> + </div> +</div></pre> + +<h3 id="CSS_3">CSS</h3> + +<pre class="brush: css">.groove { + outline-style: groove; +} +.ridge { + outline-style: ridge; +} + +/* To make the Demo clearer */ +* { outline-width: 10px; padding: 15px; }</pre> + +<p>{{ EmbedLiveSample('Example_3_-_groove_and_ridge') }}</p> + +<h2 id="Example_4_-_inset_and_outset" name="Example_4_-_inset_and_outset">Ejemplo 4 - <code>inset</code> y <code>outset</code></h2> + +<h3 id="HTML_4">HTML</h3> + +<pre class="brush: html"><div> + <div class="inset"> + <p class="outset">Outline Demo</p> + </div> +</div></pre> + +<h3 id="CSS_4">CSS</h3> + +<pre class="brush: css">.inset { + outline-style: inset; +} +.outset { + outline-style: outset; +} + +/* To make the Demo clearer */ +* { outline-width: 10px; padding: 15px; }</pre> + +<p>{{ EmbedLiveSample('Example_4_-_inset_and_outset') }}</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-style', 'outline-style')}}</td> + <td>{{Spec2('CSS3 Basic UI')}}</td> + <td>Se añade el valor <code>auto</code></td> + </tr> + <tr> + <td>{{SpecName('CSS2.1', 'ui.html#propdef-outline-style', 'outline-style')}}</td> + <td>{{Spec2('CSS2.1')}}</td> + <td>Definición inicial</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilidad_de_navegadores">Compatibilidad de navegadores</h2> + +<div>{{CompatibilityTable}}</div> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Característica</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari (WebKit)</th> + </tr> + <tr> + <td>Soporte básico</td> + <td>1.0</td> + <td>1.5 (1.8)<sup>[1]</sup></td> + <td>8.0</td> + <td>7.0</td> + <td>1.2 (125)</td> + </tr> + <tr> + <td><code>auto</code></td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Característica</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Phone</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Soporte básico</td> + <td>2.1</td> + <td>{{CompatGeckoMobile("46")}}</td> + <td>10</td> + <td>12</td> + <td>3.2</td> + </tr> + <tr> + <td><code>auto</code></td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<p>[1] En navegadores anteriores a <a href="/en-US/docs/Gecko">Gecko</a> 1.8 (<a href="/en-US/docs/Firefox_1.5_for_developers">Firefox 1.5</a>) este efecto podía lograrse usando la <a href="/es/docs/Web/CSS/Referencia_CSS/Extensiones_CSS_Mozilla">CSS de Mozilla</a> {{Cssxref("-moz-outline-style")}}.</p> |