Latest web development tutorials

propriété HTML DOM style alignSelf

Style de Object Reference style Objets

Exemples

Aligner les éléments flexibles au sein d'un projet:

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

Essayez »

Définition et utilisation

alignSelf au sein de l'attribut de conteneur souple spécifie l'alignement du projet sélectionné.

Remarque: la propriété alignSelfalignItems réinscriptibles attribut conteneur flexible.


support du navigateur

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Firefox, Opera et Chrome soutien propriété alignSelf.

grammaire

Retour propriétés alignSelf:

object .style.alignSelf

Définition des propriétés alignSelf:

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

Valeur de la propriété

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

détails techniques

Par défaut: auto
Retours: String qui représente align-auto attributs de l'élément.
CSS version CSS3


articles connexes

CSS Référence: aligner les propriétés = gauche autonomes

HTML DOM STYLE Référence: propriété alignContent

HTML DOM STYLE Référence: propriété alignItems


Style de Object Reference style Objets