🔥CSSで中央のコンテンツを水平方向と垂直方向に3つの方法✨
CSSで中央のコンテンツを水平方向と垂直方向に3つの方法✨
クラシックオプション
https://bit.ly/3oBQbc0
クラシックオプション
.classic{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
グリッドウェイ.grid{
display: grid;
place-items: center;
}
フレックスボックスウェイ.flexbox{
display: flex;
align-items: center;
justify-content: center;
}
🛴 フォローオンhttps://bit.ly/3oBQbc0
Reference
この問題について(🔥CSSで中央のコンテンツを水平方向と垂直方向に3つの方法✨), 我々は、より多くの情報をここで見つけました https://dev.to/robsonmuniz16/3-ways-to-center-content-horizontally-and-vertically-in-css-56l3テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol