From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- files/ca/web/css/margin-top/index.html | 156 +++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 files/ca/web/css/margin-top/index.html (limited to 'files/ca/web/css/margin-top') diff --git a/files/ca/web/css/margin-top/index.html b/files/ca/web/css/margin-top/index.html new file mode 100644 index 0000000000..9642251af6 --- /dev/null +++ b/files/ca/web/css/margin-top/index.html @@ -0,0 +1,156 @@ +--- +title: margin-top +slug: Web/CSS/margin-top +tags: + - CSS + - CSS Property + - Reference +translation_of: Web/CSS/margin-top +--- +
{{CSSRef}}
+ +

La propietat CSS margin-top estableix l'àrea de marge en la part superior d'un element . Un valor positiu el situarà més enllà del normal dels seus veïns, mentre que un valor negatiu el situarà més a prop.

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

The effect of the CSS margin-top property on the element box

+ +

{{cssinfo}}

+ +

Sintaxi

+ +

La propietat margin-top és especificada amb la paraula clau auto, o un <length>, o un <percentage>. El seu valor pot ser positiu, zero o negatiu.

+ +

Valors

+ +
+
{{cssxref("<length>")}}
+
La grandària del marge com a valor fix.
+
{{cssxref("<percentage>")}}
+
La grandària del marge com a percentatge, en relació amb l'amplada del bloc contenidor.
+
auto
+
El navegador selecciona un valor adequat per utilitzar. Veure {{cssxref("margin")}}.
+
+ +

Sintaxi formal

+ +
{{csssyntax}}
+ +

Exemples

+ +
.content { margin-top:   5%; }
+.sidebox { margin-top: 10px; }
+.logo    { margin-top: -5px; }
+#footer  { margin-top:  1em; }
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentsri
{{SpecName('CSS3 Box', '#the-margin', 'margin-top')}}{{Spec2('CSS3 Box')}}No hi ha cap canvi significatiu
{{SpecName('CSS3 Transitions', '#animatable-css', 'margin-top')}}{{Spec2('CSS3 Transitions')}}Defineix margin-top com animable.
{{SpecName('CSS2.1', 'box.html#margin-properties', 'margin-top')}}{{Spec2('CSS2.1')}}Elimina el seu efecte en els elements en línia
{{SpecName('CSS1', '#margin-top', 'margin-top')}}{{Spec2('CSS1')}}Definició inicial.
+ +

Navegadors compatibles

+ +

{{CompatibilityTable()}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DescripcióChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Suport bàsic1.0{{CompatVersionUnknown}}{{CompatGeckoDesktop("1")}}3.03.51.0 (85)
+

valor auto

+
1.0{{CompatVersionUnknown}}{{CompatGeckoDesktop("1")}}6.0 (strict mode)3.51.0 (85)
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
DescripcióAndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Suport bàsic1.0{{CompatVersionUnknown}}{{CompatGeckoMobile("1")}}6.06.01.0
+
-- cgit v1.2.3-54-g00ecf