中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

Style alignSelf 屬性

Style 對象參考手冊 Style 對象

實例

居中對齊靈活元素內(nèi)的某個項目:

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

運行代碼 ?

定義和用法

alignSelf 屬性規(guī)定靈活容器內(nèi)被選中項目的對齊方式。

注意:alignSelf 屬性可重寫靈活容器的 alignItems 屬性。


瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Firefox、Opera 和 Chrome 支持 alignSelf 屬性。

語法

返回 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 元素位于容器的結(jié)尾。
baseline 元素位于容器的基線上。
initial 設置該屬性為它的默認值。請參閱 initial
inherit 從父元素繼承該屬性。請參閱 inherit

技術細節(jié)

默認值: auto
返回值: 字符串,表示元素的 align-self 屬性。
CSS 版本 CSS3

相關文章

CSS 參考手冊:align-self 屬性

HTML DOM STYLE 參考手冊:alignContent 屬性

HTML DOM STYLE 參考手冊:alignItems 屬性


Style 對象參考手冊 Style 對象

其他擴展