CSS align-self Property
Voorbeeld
Centreer de uitlijningen voor een van de items in een flexibel element:
#myBlueDiv
{
align-self: center;
}
Definitie en gebruik
De align-self
eigenschap specificeert de uitlijning voor het geselecteerde item in de flexibele container.
Opmerking: De align-self
eigenschap overschrijft de eigenschap
align-items van de flexibele container .
Standaardwaarde: | auto |
---|---|
geërfd: | Nee |
Animeerbaar: | Nee. Lees over animeren |
Versie: | CSS3 |
JavaScript-syntaxis: | object .style.alignSelf="center" |
Browserondersteuning
De getallen in de tabel geven de eerste browserversie aan die de eigenschap volledig ondersteunt.
Getallen gevolgd door -webkit- specificeren de eerste versie die met een prefix werkte.
Property | |||||
---|---|---|---|---|---|
align-self | 21.0 | 11.0 | 20.0 | 9.0 7.0 -webkit- |
12.1 |
CSS-syntaxis
align-self: auto|stretch|center|flex-start|flex-end|baseline|initial|inherit;
Eigendomswaarden
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 |
Gerelateerde pagina's
CSS-referentie: eigenschap align-content
CSS-referentie: eigenschap align-items
HTML DOM-referentie: alignSelf-eigenschap