The best CSS align-self property Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Definition and Usage,CSS Syntax,Property Value,related articles,

CSS align-self property

CSS Reference CSS Reference


Examples

Align an item within the elastic object element:

#myBlueDiv
{
align-self: center;
}


Browser Support

Figures in the table represent the first browser to support the property version number.

Immediately following the digital -webkit-, -ms- or -moz- after the first version to support the prefix property.

Attributes
align-self 21.0 11.0 20.0 9.0
7.0 -webkit-
12.1

Definition and Usage

align-self attributes defined flex child alone on the side of the shaft (vertical axis) direction of alignment. .

Note: align-self attributes rewritable align-items attribute flexible container.

Defaults: auto
inherit: no
Can be animated: no. Please refer to animation (Animatable) .
version: CSS3
JavaScript syntax: object .style.alignSelf = "center"to try


CSS Syntax

align-self: auto|stretch|center|flex-start|flex-end|baseline|initial|inherit;

Property Value

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


related articles

CSS Reference: align = left-Content attributes

CSS Reference: align = left-attribute items View


CSS Reference CSS Reference

CSS align-self property
10/30