flexboxを使ったブロックの中身を上下左右中央揃え覚書
<div class="content"> <p>上下左右中央にする</p> </div>
.content { display: flex; justify-content: center; align-items: center; }
justify-content … 左右中央揃え
align-items … 上下中央揃え
備忘録。そのときそのときに勉強しているもののメモ
Copyright© immature , 2023 All Rights Reserved Powered by STINGER.