Vlastnost CSS align-self
Příklad
Vycentrujte zarovnání pro jednu z položek uvnitř flexibilního prvku:
#myBlueDiv
{
align-self: center;
}
Definice a použití
Vlastnost align-self
určuje zarovnání pro vybranou položku uvnitř flexibilního kontejneru.
Poznámka: Vlastnost align-self
přepíše vlastnost
align-items flexibilního kontejneru .
Výchozí hodnota: | auto |
---|---|
Zděděno: | Ne |
Animovatelné: | Ne. Přečtěte si o tématu Animable |
Verze: | CSS3 |
Syntaxe JavaScriptu: | objekt .style.alignSelf="center" |
Podpora prohlížeče
Čísla v tabulce určují první verzi prohlížeče, která plně podporuje vlastnost.
Čísla následovaná -webkit- určují první verzi, která pracovala s předponou.
Property | |||||
---|---|---|---|---|---|
align-self | 21.0 | 11.0 | 20.0 | 9.0 7.0 -webkit- |
12.1 |
Syntaxe CSS
align-self: auto|stretch|center|flex-start|flex-end|baseline|initial|inherit;
Hodnoty vlastností
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 |
Související stránky
CSS reference: vlastnost align-content
CSS Reference: Vlastnost align-items
Odkaz HTML DOM: vlastnost alignSelf