HTML & CSS クイズ: Flexbox

This CSS quiz tests how flexbox really distributes space. You will compute item widths from flex-grow, flex-shrink and flex-basis, choose the right alignment property for each axis, and fix the classic overflow caused by min-width: auto.

ふつう 10問 約6分 合格ライン 80%

モードを選ぶ

ゲストとしてプレイ中です。ログインすると XP と連続記録が保存されます。

例題

第1問 / 全10問

The three children are plain <div>s. How are they laid out?

<style>
  .row { display: flex; }
</style>
<div class="row">
  <div>A</div>
  <div>Bbbbbb</div>
  <div>C</div>
</div>
答えを見る

B. Side by side, each as wide as its content, starting at the left, and all as tall as the row The defaults are flex-direction: row, justify-content: flex-start, flex: 0 1 auto (no growing) and align-items: stretch. So items sit in a row at their content width and stretch to the row's height.

このクイズの内容

  • Flex container defaults and the main and cross axis
  • Growing and shrinking with flex-grow, flex-shrink and flex-basis
  • What flex: 1 and flex: auto mean
  • justify-content, align-items and auto margins
  • Wrapping, order and the min-width: auto trap

よくある質問

アカウントは必要ですか?

いいえ、誰でも遊べます。ログインすると XP、連続記録、バッジ、履歴が保存されます。

何度でも挑戦できますか?

はい。ベストスコアが記録され、問題と選択肢は毎回シャッフルされます。