Propriedade CSS align-self
Exemplo
Centralize os alinhamentos de um dos itens dentro de um elemento flexível:
#myBlueDiv
{
align-self: center;
}
Definição e uso
A align-self
propriedade especifica o alinhamento do item selecionado dentro do contêiner flexível.
Observação: a align-self
propriedade substitui a propriedade
align-items do contêiner flexível .
Valor padrão: | auto |
---|---|
Herdado: | não |
Animavel: | não. Leia sobre animáveis |
Versão: | CSS3 |
Sintaxe JavaScript: | objeto .style.alignSelf="center" |
Suporte ao navegador
Os números na tabela especificam a primeira versão do navegador que oferece suporte total à propriedade.
Números seguidos por -webkit- especificam a primeira versão que funcionou com um prefixo.
Property | |||||
---|---|---|---|---|---|
align-self | 21.0 | 11.0 | 20.0 | 9.0 7.0 -webkit- |
12.1 |
Sintaxe CSS
align-self: auto|stretch|center|flex-start|flex-end|baseline|initial|inherit;
Valores de propriedade
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
Referência CSS: propriedade align-content
Referência CSS: propriedade align-items
Referência HTML DOM: propriedade alignSelf