【CSS知識②】上下中央するときは下記みたいに書くよ .子要素のクラス名 { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }