CSS リファレンス

CSS のセレクター、display、ボックスモデル、Flexbox、Grid、position に加え、タイポグラフィ、テキスト、色、背景、ボーダー、サイズと overflow のクイックリファレンスです。チュートリアルを補足するものであり、置き換えではありません。本文は現在英語です。

リファレンスページの本文は現在英語です。

短い案内が必要なときはチュートリアルを、構文・初期値・条件・境界を調べるときは各リファレンスページを使います。例は完全な HTML と CSS の断片で、構文と構造を CSS パーサーで確認していますが、ブラウザーでは描画していません。

CSS tutorial overview →

TopicWhat it covers
SelectorsQuick reference for CSS selectors: common patterns, specificity, and the :is, :where, and :not rules, complementary to the CSS tutorial.
DisplayQuick reference for CSS display: outer and inner display roles, common keywords, and how display: none differs from visibility.
Box modelQuick reference for the CSS box model: box-sizing calculations, padding, border, margin, and when vertical margins collapse.
FlexboxQuick reference for CSS Flexbox: main and cross axes, default alignment, gap, and why flex items default to min-width: auto.
GridQuick reference for CSS Grid: track sizing, why 1fr is minmax(auto, 1fr), minmax(0, 1fr), and auto-fit versus auto-fill.
PositionQuick reference for CSS position: static, relative, absolute, sticky, and fixed, including sticky inset and overflow, and why absolute is not always relative to the parent.
TypographyQuick reference for CSS font families, font-size, line-height, the font shorthand, and the limits of font loading on this site.
TextQuick reference for CSS text-align, wrapping, overflow-wrap versus word-break, and the conditions required for text-overflow.
ColorsQuick reference for CSS color syntax, alpha, currentColor, and how opacity differs from a transparent color and from hiding interaction.
BackgroundsQuick reference for CSS background-color, layers, position, size, and using a gradient instead of a network image.
BordersQuick reference for CSS borders, border-radius, and outline, including layout size and focus visibility.
Sizing and overflowQuick reference for CSS width, height, min/max sizes, percentage heights and the containing block, and overflow including clip versus hidden.