Resumen
El descriptor CSS height
es un descriptor de forma reducida para establecer min-height
y max-height
en el viewport. Definiendo un valor de longitud para viewport se establecerán los dos, altura mínima y altura máxima, con el valor definido.
Si se definen dos valores de viewport, el primero corresponderá a la altura mínima, y el segundo, a la altura máxima.
Related at-rule | @viewport |
---|---|
Valor inicial | as each of the properties of the shorthand:
|
Percentages | as each of the properties of the shorthand:
|
Media | as each of the properties of the shorthand:
|
Valor calculado | as each of the properties of the shorthand:
|
Canonical order | order of appearance in the formal grammar of the values |
Sintaxis
/* Un valor */
height: auto;
height: 320px;
height: 15em;
/* Dos valores */
height: 320px 200px;
Valores
auto
- El valor a usar es calculado con los valores de otros descriptores CSS.
<length>
- Un valor
<length>
de longitud absoluta o relativa no negativa. <percentage>
- Un valor
<percentage>
del porcentaje relativo a la anchura o altura del viewport inicial, con factor de zoom de 1.0, para longitudes verticales y horizontales respectivamente. No puede ser negativo.
Sintaxis formal
<viewport-length>{1,2}where
<viewport-length> = auto | <length-percentage>
where
<length-percentage> = <length> | <percentage>
Ejemplo
@viewport {
height: 500px;
}
Especificaciones
Especificación | Estado | Comentarios |
---|---|---|
CSS Device Adaptation La definición de '"height" descriptor' en esta especificación. |
Working Draft | Definición inicial |
Compatibilidad de navegadores
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Soporte básico | 29 (usando una bandera) | Sin soporte | 10 -ms | 11.10 Removido en 15 Reintroducido con una bandera en 16 |
Sin soporte |
Característica | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Soporte básico | 4.4 | 29 | Sin soporte | 10-ms | 11.10 Removido en 15 Reintroducido con una bandera en 16 |
Sin soporte |