CSS align-self Propiedad
Ejemplo
Centre las alineaciones de uno de los elementos dentro de un elemento flexible:
#myBlueDiv
{
align-self: center;
}
Definición y uso
La align-self
propiedad especifica la alineación del elemento seleccionado dentro del contenedor flexible.
Nota: La propiedad anula la propiedad de elementos de alineaciónalign-self
del contenedor flexible
.
Valor por defecto: | auto |
---|---|
Heredado: | No |
Animable: | No. Leer sobre animable |
Versión: | CSS3 |
Sintaxis de JavaScript: | objeto .style.alignSelf="centro" |
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Los números seguidos de -webkit- especifican la primera versión que funcionó con un prefijo.
Property | |||||
---|---|---|---|---|---|
align-self | 21.0 | 11.0 | 20.0 | 9.0 7.0 -webkit- |
12.1 |
Sintaxis CSS
align-self: auto|stretch|center|flex-start|flex-end|baseline|initial|inherit;
Valores de propiedad
Value | Description | Play it |
---|---|---|
auto | Default. The element inherits its parent container's align-items property, or "stretch" if it has no parent container | |
stretch | The element is positioned to fit the container | |
center | The element is positioned at the center of the container | |
flex-start | The element is positioned at the beginning of the container | |
flex-end | The element is positioned at the end of the container | |
baseline | The element is positioned at the baseline of the container | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
páginas relacionadas
Referencia de CSS: propiedad de alineación de contenido
Referencia de CSS: propiedad de elementos de alineación
Referencia HTML DOM: propiedad alignSelf