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/max-height/index.html | 223 +++++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 files/ca/web/css/max-height/index.html (limited to 'files/ca/web/css/max-height/index.html') diff --git a/files/ca/web/css/max-height/index.html b/files/ca/web/css/max-height/index.html new file mode 100644 index 0000000000..9ae113b699 --- /dev/null +++ b/files/ca/web/css/max-height/index.html @@ -0,0 +1,223 @@ +--- +title: max-height +slug: Web/CSS/max-height +tags: + - CSS + - CSS Property + - NeedsMobileBrowserCompatibility + - Reference +translation_of: Web/CSS/max-height +--- +
{{CSSRef}}
+ +

La propietat CSS max-height estableix l'alçada màxima d'un element. Impedeix que el valor utilitzat per la propietat {{ Cssxref("height") }} sigui més gran que el valor especificat per max-height.

+ +
/* <length> value */
+max-height: 3.5em;
+
+/* <percentage> value */
+max-height: 75%;
+
+/* Keyword values */
+max-height: none;
+max-height: max-content;
+max-height: min-content;
+max-height: fit-content;
+max-height: fill-available;
+
+/* Global values */
+max-height: inherit;
+max-height: initial;
+max-height: unset;
+
+ +

{{ Cssxref("max-height") }} anul·la {{cssxref("height")}}, però {{ Cssxref("min-height") }} anul·la {{ Cssxref("max-height") }}.

+ +

{{cssinfo}}

+ +

Sintaxi

+ +

Valors

+ +
+
{{cssxref("<length>")}}
+
L'alçada màxima, expressada com {{cssxref("<length>")}}.
+
{{cssxref("<percentage>")}}
+
L'alçada màxima, expressada com {{cssxref("<percentage>")}} de l'alçada del bloc contenidor. Si l'alçada del bloc contenidor no s'especifica explícitament, el valor del percentatge es tractarà com a zero.
+
+ +

Valors de paraules clau

+ +
+
none
+
L'alçada no té un valor màxim.
+
max-content{{experimental_inline()}}
+
L'alçada preferida intrínseca.
+
min-content{{experimental_inline()}}
+
L'alçada mínima intrínseca.
+
fill-available{{experimental_inline()}}
+
L'alçada del bloc contenidor menys el marge vertical, la vora i el farcit. (Tingueu en compte que alguns navegadors implementen un nom antic per a aquesta paraula clau, available.)
+
fit-content{{experimental_inline()}}
+
El mateix que max-content.
+
+ +

Sintaxi formal

+ +
{{csssyntax}}
+ +

Exemples

+ +
table { max-height: 75%; }
+
+form { max-height: none; }
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentari
{{ SpecName('CSS3 Sizing', '#width-height-keywords', 'max-height') }}{{ Spec2('CSS3 Sizing') }}Afegeix les paraules clau max-content, min-content, fit-content i fill-available. (Els esborranys CSS3 Box i CSS3 Writing Modes s'utilitzen per definir aquestes paraules clau, però són substituïdes per aquesta especificació).
{{ SpecName('CSS3 Transitions', '#animatable-css', 'max-height') }}{{ Spec2('CSS3 Transitions') }}Defineix max-height com animable.
{{ SpecName('CSS2.1', 'visudet.html#min-max-heights', 'max-height') }}{{ Spec2('CSS2.1') }}Definició inicial.
+ +

Navegador compatibles

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DescripcióChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Suport bàsic1.0{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}7.07.01.0
s'aplica a <table>[1]{{ CompatNo() }}{{CompatNo}}{{CompatVersionUnknown()}}{{ CompatNo() }}{{CompatVersionUnknown()}}{{ CompatNo() }}
max-content, min-content i fit-content {{ experimental_inline() }}{{ CompatNo() }} [3]{{CompatNo}}{{CompatGeckoDesktop("1.9")}}{{property_prefix("-moz")}} [2]{{ CompatNo() }}{{ CompatNo() }}9[3](bug)
fill-available {{ experimental_inline() }}{{ CompatNo() }}{{CompatNo}}{{ CompatNo() }} {{ bug(527285) }}{{ CompatNo() }}{{ CompatNo() }}{{ CompatNo() }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DescripcióAndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Suport bàsic{{ CompatUnknown() }}{{CompatVersionUnknown}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
s'aplica a <table>[1]{{ CompatUnknown() }}{{CompatNo}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
max-content, min-content i fit-content {{ experimental_inline() }}{{ CompatUnknown() }}{{CompatNo}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}9[3](bug)
fill-available {{ experimental_inline() }}{{ CompatUnknown() }}{{CompatNo}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +

[1] CSS 2.1 deixa explícitament indefinit el comportament de max-height amb {{ HTMLElement("table") }}. Per tant, qualsevol comportament és compatible amb CSS2.1; les noves especificacions de CSS poden definir aquest comportament, de manera que els desenvolupadors web no haurien de confiar en un específic ara.

+ +

[2] Gecko implementa experimentalment les definicions donades en CSS3 Basic Box. Aquesta defineix available i no fill-available. També la definició de fit-content és més simple que en CSS3 Sizing.

+ +

[3] WebKit implementa una proposta anterior per establir l'alçada a una alçada intrínseca: les paraules clau són intrinsic, en comptes de max-content i min-intrinsic, en comptes de min-content. No hi ha equivalent per fill-available o fit-content.

+ +

Vegeu també

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