Style alignSelf 屬性
- 上一頁 alignItems
- 下一頁 animation
- 返回上一層 HTML DOM Style 對象
語法
返回 alignSelf 屬性:
object.style.alignSelf
設置 alignSelf 屬性:
object.style.alignSelf = "auto|stretch|center|flex-start|flex-end|baseline|initial|inherit"
屬性值
值 | 描述 |
---|---|
auto | 默認。元素繼承其父容器的 align-items 屬性,如果沒有父容器,則為 "stretch"。 |
stretch | 元素被拉伸以適應容器。 |
center | 元素位于容器的中心。 |
flex-start | 元素位于容器的開頭。 |
flex-end | 元素位于容器的末尾。 |
baseline | 元素位于容器的基線。 |
initial | 將此屬性設置為其默認值。請參閱 initial。 |
inherit | 從其父元素繼承此屬性。請參閱 inherit。 |
技術細節
默認值: | auto |
---|---|
返回值: | 字符串,表示元素的 align-self 屬性。 |
CSS 版本: | CSS3 |
瀏覽器支持
alignItems
是 CSS3 (1999) 特性。
所有瀏覽器都完全支持它:
Chrome | Edge | Firefox | Safari | Opera | IE |
---|---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera | IE |
支持 | 支持 | 支持 | 支持 | 支持 | 11 |
- 上一頁 alignItems
- 下一頁 animation
- 返回上一層 HTML DOM Style 對象