From 1109132f09d75da9a28b649c7677bb6ce07c40c0 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:45 -0500 Subject: initial commit --- files/es/web/css/outline/index.html | 128 ++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 files/es/web/css/outline/index.html (limited to 'files/es/web/css/outline') diff --git a/files/es/web/css/outline/index.html b/files/es/web/css/outline/index.html new file mode 100644 index 0000000000..288c5fca34 --- /dev/null +++ b/files/es/web/css/outline/index.html @@ -0,0 +1,128 @@ +--- +title: outline +slug: Web/CSS/outline +tags: + - Contorno CSS + - Propiedad CSS +translation_of: Web/CSS/outline +--- +
{{CSSRef}}
+ +

La propiedad CSS outline es una forma reducida para establecer una o más de las propiedades individuales de contorno {{cssxref("outline-style")}}, {{cssxref("outline-width")}} y {{cssxref("outline-color")}} en una sola declaración. En la mayoría de los casos el uso de este atajo es preferible y más conveniente.

+ +
{{EmbedInteractiveExample("pages/css/outline.html")}}
+ +

Al igual que con todas las propiedades abreviadas, cualquier subvalor omitido se establecerá en su valor inicial.

+ +

Border vs outline

+ +

Los bordes y los contornos son muy similares. Sin embargo, los contornos difieren de los bordes de la siguiente manera:

+ + + +
{{cssinfo}}
+ +

Sintaxis

+ +
/* style */
+outline: solid;
+
+/* color | style */
+outline: #f66 dashed;
+
+/* style | width */
+outline: inset thick;
+
+/* color | style | width */
+outline: green solid 3px;
+
+/* Global values */
+outline: inherit;
+outline: initial;
+outline: unset;
+ +

Valores

+ +

Uno, dos o tres valores, en orden arbitrario:

+ +
+
<outline-width>
+
Ver {{Cssxref("outline-width")}}.
+
<outline-style>
+
Ver {{Cssxref("outline-style")}}.
+
<outline-color>
+
Desde Gecko 1.9 (Firefox 3), es usado el valor de la propiedad {{Cssxref("color")}} del elemento (color de primer plano). Ver {{Cssxref("outline-color")}}.
+
+ +

Sintaxis formal

+ +
{{csssyntax}}
+ +

Example

+ +

HTML

+ +
<a href="#">Este link tiene un estilo especial para el foco</a>
+
+ +

CSS

+ +
a {
+  border: 1px solid;
+  border-radius: 3px;
+  display: inline-block;
+  margin: 10px;
+  padding: 5px;
+}
+
+a:focus {
+  outline: 4px dotted #e73;
+  outline-offset: 4px;
+  background: #ffa;
+}
+
+ +

Result

+ +

{{EmbedLiveSample("Example", "100%", 60)}}

+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoComentarios
{{SpecName('CSS3 Basic UI', '#outline', 'outline')}}{{Spec2('CSS3 Basic UI')}}Sin cambios
{{SpecName('CSS2.1', 'ui.html#propdef-outline', 'outline')}}{{Spec2('CSS2.1')}}Definición inicial
+ +

Compatibilidad de navegadores

+ +
+ + +

{{Compat("css.properties.outline")}}

+
-- cgit v1.2.3-54-g00ecf