Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ コンテンツの水平方向の整列 | Flexboxによるモダンレイアウト
/
CSSの基礎

bookコンテンツの水平方向の整列

メニューを表示するにはスワイプしてください

justify-content プロパティは、メイン軸に沿ったフレックスアイテムの位置を決定するために重要な役割を果たします。デフォルト値は flex-start です。

justify-content: flex-start | flex-end | center | space-between | space-around;

それぞれのケースを実際に確認します。カードのリストを使って試します。

flex-start

デフォルト値であり、すべてのアイテムがメイン軸の先頭に配置されます。

index.html

index.html

index.css

index.css

copy

flex-end

すべてのアイテムが軸の終端に配置される。

index.html

index.html

index.css

index.css

copy

center

すべてのアイテムが中央に配置されます。

index.html

index.html

index.css

index.css

copy

space-around

すべてのアイテムが主軸に沿って均等に配置され、両端にも少しスペースが残ります。

index.html

index.html

index.css

index.css

copy

space-between

space-around に非常によく似ていますが、両端の軸にはスペースが残りません。

index.html

index.html

index.css

index.css

copy
question mark

次のうち、justify-content プロパティの値として、フレックスアイテムをフレックスコンテナの中央に揃えるものはどれですか?

正しい答えを選んでください

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 4.  3

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 4.  3
some-alt