Latest web development tutorials

propriedade HTML DOM Estilo alignSelf

Estilo Object Reference estilo Objects

Exemplos

Alinhar elementos flexíveis dentro de um projeto:

document.getElementById("myDIV").style.alignSelf="center";

tente »

Definição e Uso

alignSelf dentro do recipiente flexível atributo especifica o alinhamento projecto seleccionado.

Nota: alignSelf propriedades alignItems regraváveis atributo recipiente flexível.


Suporte a navegadores

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Firefox, Opera e Chrome suporte alignSelf propriedade.

gramática

Propriedades volta alignSelf:

object .style.alignSelf

Definindo as propriedades alignSelf:

object .style.alignSelf="auto|stretch|center|flex-start|flex-end|baseline|initial|inherit"

Valor de propriedade

描述
auto 默认值。元素继承了它的父容器的 align-items 属性。如果没有父容器则为 "stretch"。
stretch 元素被拉伸以适应容器。
center 元素位于容器的中心。
flex-start 元素位于容器的开头。
flex-end 元素位于容器的结尾。
baseline 元素位于容器的基线上。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

detalhes técnicos

padrão: automático
retorna: String que representa atributos align-auto do elemento.
versão CSS CSS3


artigos relacionados

CSS Referência: alinhar propriedades = left independentes

HTML DOM estilo de referência: propriedade alignContent

HTML DOM estilo de referência: alignItems propriedade


Estilo Object Reference estilo Objects