余白を消した!CSS margin-trimで整然レイアウト
VISTA DE CÓDIGO
エディタを読み込み中…
P
Prompt
A modern CSS layout demo using the new margin-trim property. Show a container with multiple child elements where margin-trim removes unnecessary whitespace, creating neat spacing without extra wrappers or negative margins. Use flexbox and a clean color palette.
CSS margin-trimは、コンテナ内の最初と最後の子要素の余分な余白を除去する新しいプロパティです。flexやgridコンテナに margin-trim: block を設定すると、先頭の子の先頭マージンと末尾の子の末尾マージンがトリムされ、端の不要な空白がなくなります。レイアウトのスペーシングが予測しやすくなり、ネガティブマージンや余分なラッパーdivが不要になります。
¿Te resultó útil este prompt?
Comentarios
Los comentarios aparecen después de la moderación
この記事が役に立ったら投げ銭で応援
Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済
開発者が選ぶ最強ツール集
運営者が毎日使っているツール・ガジェット 6選