CSSalign -selfプロパティ
例
フレキシブル要素内のアイテムの1つの配置を中央に配置します。
#myBlueDiv
{
align-self: center;
}
定義と使用法
プロパティは、フレキシブルコンテナ内の選択されたアイテムのalign-self
配置を指定します。
注:このalign-self
プロパティは、フレキシブルコンテナの
align-itemsプロパティを上書きします。
デフォルト値: | 自動 |
---|---|
遺伝性の: | いいえ |
アニメート可能: | 番号。アニメート可能について読む |
バージョン: | CSS3 |
JavaScript構文: | object .style.alignSelf = "center" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
数字の後に-webkit-が続く場合は、プレフィックスを使用して機能した最初のバージョンを指定します。
Property | |||||
---|---|---|---|---|---|
align-self | 21.0 | 11.0 | 20.0 | 9.0 7.0 -webkit- |
12.1 |
CSS構文
align-self: auto|stretch|center|flex-start|flex-end|baseline|initial|inherit;
プロパティ値
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 |
関連ページ
CSSリファレンス:align-contentプロパティ
CSSリファレンス:align-itemsプロパティ
HTML DOMリファレンス:alignSelfプロパティ