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/margin-block/index.html | 108 +++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 files/es/web/css/margin-block/index.html (limited to 'files/es/web/css/margin-block') diff --git a/files/es/web/css/margin-block/index.html b/files/es/web/css/margin-block/index.html new file mode 100644 index 0000000000..680b41219d --- /dev/null +++ b/files/es/web/css/margin-block/index.html @@ -0,0 +1,108 @@ +--- +title: margin-block +slug: Web/CSS/margin-block +translation_of: Web/CSS/margin-block +--- +

{{CSSRef}}{{SeeCompatTable}}  

+ +

La propiedad de CSS margin-block define el bloque lógico de inicio y fin de las márgenes de un elemento, que se asigna a las márgenes físicas en función del modo de escritura del elemento, la direccionalidad y la orientación del texto.

+ +
/* <length> values */
+margin-block: 10px 20px;  /* An absolute length */
+margin-block: 1em 2em;   /* relative to the text size */
+margin-block: 5% 2%;    /* relative to the nearest block container's width */
+margin-block: 10px; /* sets both start and end values */
+
+/* Keyword values */
+margin-block: auto;
+
+/* Global values */
+margin-block: inherit;
+margin-block: initial;
+margin-block: unset;
+
+ + + +

Estos valores corresponden a {{CSSxRef("margin-top")}} y  {{CSSxRef("margin-bottom")}}, o {{CSSxRef("margin-right")}}, y {{CSSxRef("margin-left")}} depende de los valores definidos para {{CSSxRef("writing-mode")}}, {{CSSxRef("direction")}}, y {{CSSxRef("text-orientation")}}.

+ +

Propiedades que lo constituyen

+ +

Los valores se pueden establecer individualmente como {{CSSxRef("margin-block-start")}} y {{CSSxRef("margin-block-end")}}. La propiedad de dirección en línea es {{CSSxRef("margin-inline")}} que establece {{CSSxRef("margin-inline-start")}}, y {{CSSxRef("margin-inline-end")}}.

+ +

Sintaxis

+ +

Valores

+ +

La propiedad margin-block toma los mismos valores de la propiedad {{CSSxRef("margin-left")}}.

+ +

Definición formal

+ +

{{cssinfo}}

+ +

Sintaxis formal

+ +
{{CSSSyntax}}
+ +

Ejemplo

+ +

Definiendo el comienzo del bloque y el fin de los margenes

+ +

HTML

+ +
<div>
+  <p class="exampleText">Example text</p>
+</div>
+
+ +

CSS

+ +
div {
+  background-color: yellow;
+  width: 120px;
+  height: 120px;
+}
+
+.exampleText {
+  writing-mode: vertical-rl;
+  margin-block: 20px 40px;
+  background-color: #c8c800;
+}
+ +

Resultado

+ +

{{EmbedLiveSample("Ejemplo", 140, 140)}}

+ +

Especificación

+ + + + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName("CSS Logical Properties", "#propdef-margin-block", "margin-block")}}{{Spec2("CSS Logical Properties")}}Definición inicial.
+ +

{{CSSInfo}}

+ +

Compatibilidad en navegadores

+ + + +

{{Compat("css.properties.margin-block")}}

+ +

Mira también

+ + -- cgit v1.2.3-54-g00ecf