CSSプロパティ一覧【カテゴリ別・使用例付きリファレンス】

CSSプロパティとは、HTML要素の見た目やレイアウトを制御するための指定項目です。この記事では、実務で頻繁に使用するCSSプロパティをカテゴリ別に整理し、使用例付きで一覧化しました。

Flexbox・Grid・アニメーションの基本から、CSS Nesting・:has()・コンテナクエリなどのモダンCSS(2024〜2026年)まで網羅しています。ブックマークして辞書的にお使いください。

詳細はMDN Web Docsで確認ください。※随時更新

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


レイアウト

ページの構造やFlexbox・Gridなどの配置レイアウトに関するプロパティです。

プロパティ説明使用例
display要素の表示形式を指定display: flex; / display: grid; / display: none;
position要素の配置方法を指定position: relative; / position: absolute; / position: sticky;
top / right / bottom / leftpositionで配置した要素の位置を指定top: 0; left: 50%;
z-index要素の重なり順を指定z-index: 10;
float要素を左右に回り込ませるfloat: left;
clearfloatの回り込みを解除clear: both;
flex-directionFlexアイテムの並び方向flex-direction: column;
flex-wrapFlexアイテムの折り返しflex-wrap: wrap;
flex-growFlexアイテムの伸び率flex-grow: 1;
flex-shrinkFlexアイテムの縮み率flex-shrink: 0;
flex-basisFlexアイテムの基準サイズflex-basis: 200px;
justify-content主軸方向の配置justify-content: center; / space-between
align-items交差軸方向の配置align-items: center; / stretch
align-self個別アイテムの交差軸配置align-self: flex-end;
align-content複数行の交差軸配置align-content: space-around;
gapFlex/Grid要素間の隙間gap: 16px; / gap: 16px 24px;
orderFlexアイテムの表示順order: -1;
grid-template-columnsGridの列構成を定義grid-template-columns: repeat(3, 1fr);
grid-template-rowsGridの行構成を定義grid-template-rows: auto 1fr auto;
grid-template-areasGridのエリア名を定義grid-template-areas: "header header" "sidebar main";
grid-columnGrid要素の列位置を指定grid-column: 1 / 3;
grid-rowGrid要素の行位置を指定grid-row: span 2;
grid-areaGrid要素の配置エリアを指定grid-area: header;
grid-auto-flowGrid自動配置の方向grid-auto-flow: dense;
grid-auto-columns暗黙的に追加される列のサイズgrid-auto-columns: minmax(100px, 1fr);
grid-auto-rows暗黙的に追加される行のサイズgrid-auto-rows: 200px;
place-itemsalign-items + justify-itemsの一括指定place-items: center;
place-contentalign-content + justify-contentの一括指定place-content: center;
justify-itemsGrid要素の水平配置justify-items: start;
justify-self個別Grid要素の水平配置justify-self: end;

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


ボックスモデル

要素のサイズ・余白・はみ出し制御に関するプロパティです。

プロパティ説明使用例
width要素の幅を指定width: 100%; / width: 300px;
height要素の高さを指定height: 100vh;
max-width最大幅を制限max-width: 1200px;
min-width最小幅を保証min-width: 320px;
max-height最大高さを制限max-height: 500px;
min-height最小高さを保証min-height: 100vh;
margin外側の余白を設定margin: 0 auto; / margin-block: 2rem;
padding内側の余白を設定padding: 16px 24px;
box-sizing幅・高さの計算方法を指定box-sizing: border-box;
overflowはみ出したコンテンツの処理overflow: hidden; / overflow: auto;
overflow-x / overflow-y水平・垂直方向のはみ出し個別制御overflow-x: scroll; overflow-y: hidden;
aspect-ratio幅と高さの比率を指定aspect-ratio: 16 / 9;
block-size / inline-size書字方向に対応したサイズ指定block-size: 100%; inline-size: fit-content;
margin-block / margin-inline論理方向の余白margin-inline: auto;
padding-block / padding-inline論理方向の内側余白padding-block: 1rem;

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


テキスト・フォント

文字の見た目・サイズ・配置・装飾に関するプロパティです。

プロパティ説明使用例
font-size文字サイズを指定font-size: 16px; / font-size: clamp(16px, 2vw, 24px);
font-weight文字の太さを指定font-weight: bold; / font-weight: 700;
font-familyフォントの種類を指定font-family: 'Noto Sans JP', sans-serif;
font-styleイタリック等のスタイルfont-style: italic;
font-variant小型大文字などのバリアントfont-variant: small-caps;
font-feature-settingsOpenType機能の有効化font-feature-settings: 'palt';
font-variation-settings可変フォントの軸を調整font-variation-settings: 'wght' 450;
line-height行の高さを指定line-height: 1.8;
letter-spacing文字間の間隔letter-spacing: 0.05em;
word-spacing単語間の間隔word-spacing: 0.1em;
text-alignテキストの水平配置text-align: center; / text-align: justify;
text-decoration下線・取消線などの装飾text-decoration: underline wavy red;
text-transform大文字・小文字の変換text-transform: uppercase;
text-indent最初の行の字下げtext-indent: 1em;
text-overflowはみ出したテキストの処理text-overflow: ellipsis;
text-shadowテキストに影をつけるtext-shadow: 2px 2px 4px rgba(0,0,0,.3);
white-space空白・改行の扱いwhite-space: nowrap; / pre-wrap
word-break単語の改行ルールword-break: break-all;
overflow-wrap長い単語の折り返しoverflow-wrap: break-word;
writing-modeテキストの書字方向writing-mode: vertical-rl;
directionテキストの方向(RTL/LTR)direction: rtl;
hyphensハイフンによる自動改行hyphens: auto;
text-wrapテキストの折り返しバランスtext-wrap: balance;
line-break行分割の厳密さline-break: strict;

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


背景・装飾

背景色・画像、枠線、影、透明度などの装飾プロパティです。

プロパティ説明使用例
background背景の一括指定background: #f0f0f0 url(bg.png) no-repeat center / cover;
background-color背景色background-color: #ffffff;
background-image背景画像・グラデーションbackground-image: linear-gradient(135deg, #667eea, #764ba2);
background-size背景画像のサイズbackground-size: cover; / contain
background-position背景画像の位置background-position: center top;
background-repeat背景画像の繰り返しbackground-repeat: no-repeat;
background-attachment背景画像のスクロール固定background-attachment: fixed;
background-clip背景の描画範囲background-clip: text;
background-origin背景画像の基準位置background-origin: padding-box;
background-blend-mode背景画像の合成モードbackground-blend-mode: multiply;
border枠線の一括指定border: 1px solid #ddd;
border-radius角の丸みborder-radius: 8px; / border-radius: 50%;
border-style枠線のスタイルborder-style: dashed;
border-width枠線の太さborder-width: 2px;
border-image枠線に画像を使用border-image: linear-gradient(red, blue) 1;
border-collapseテーブル枠線の統合border-collapse: collapse;
border-spacingテーブルセル間の間隔border-spacing: 4px;
box-shadow要素に影をつけるbox-shadow: 0 4px 6px rgba(0,0,0,.1);
opacity要素の透明度opacity: 0.8;
outlineアウトライン(フォーカス枠等)outline: 2px solid blue;
outline-offsetアウトラインと要素の距離outline-offset: 4px;

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


色・フィルター・合成

色の指定、画像フィルター、レイヤーの合成モードに関するプロパティです。

プロパティ説明使用例
colorテキストの色を指定color: #333; / color: oklch(0.7 0.15 250);
accent-colorチェックボックス等のアクセント色accent-color: #3460fb;
color-schemeダーク/ライトモード対応color-scheme: light dark;
filter要素にフィルター効果を適用filter: blur(4px); / filter: grayscale(1);
backdrop-filter背景にフィルター効果を適用backdrop-filter: blur(10px) saturate(180%);
mix-blend-mode要素の合成モードmix-blend-mode: multiply;
isolation合成モードの影響を隔離isolation: isolate;
color-mix()2色を混合して新しい色を生成color: color-mix(in srgb, #3460fb 70%, white);

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


トランスフォーム・アニメーション

要素の変形、遷移効果、アニメーションに関するプロパティです。

プロパティ説明使用例
transform要素を変形(移動・回転・拡大)transform: translateX(-50%) rotate(45deg);
transform-origin変形の基点を指定transform-origin: center bottom;
transitionプロパティ変化時のアニメーションtransition: all 0.3s ease;
transition-delay遷移開始までの待機時間transition-delay: 0.1s;
animationCSSアニメーションの一括指定animation: fadeIn 0.5s ease forwards;
animation-name使用するキーフレーム名animation-name: slideIn;
animation-durationアニメーションの実行時間animation-duration: 1s;
animation-timing-function速度変化の曲線animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
animation-delay開始までの待機時間animation-delay: 0.3s;
animation-iteration-count繰り返し回数animation-iteration-count: infinite;
animation-direction再生方向animation-direction: alternate;
animation-fill-mode実行前後の状態animation-fill-mode: forwards;
backface-visibility3D変換時の裏面表示backface-visibility: hidden;
perspective3D空間の奥行きperspective: 1000px;
will-change変更予定のプロパティをブラウザに通知will-change: transform;

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


レスポンシブ・メディア

レスポンシブデザインや画像・動画の表示に関するプロパティです。

プロパティ説明使用例
object-fit置換要素のフィット方法object-fit: cover; / contain
object-position置換要素の表示位置object-position: center top;
@mediaメディアクエリ(画面幅等で分岐)@media (max-width: 768px) { ... }
@containerコンテナクエリ(親要素のサイズで分岐)@container (min-width: 400px) { ... }
container-typeコンテナクエリの対象に指定container-type: inline-size;
container-nameコンテナに名前を付けるcontainer-name: card;
clamp()最小値・推奨値・最大値を指定font-size: clamp(16px, 2.5vw, 24px);
min() / max()値の最小・最大を取得width: min(100%, 600px);

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


スクロール・インタラクション

スクロール動作、カーソル、ユーザー操作に関するプロパティです。

プロパティ説明使用例
scroll-behaviorスクロールのアニメーションscroll-behavior: smooth;
scroll-snap-typeスクロール位置の自動吸着scroll-snap-type: x mandatory;
scroll-snap-alignスナップの基準位置scroll-snap-align: start;
scroll-marginスクロール時のマージンscroll-margin-top: 80px;
overscroll-behaviorスクロール端の挙動制御overscroll-behavior: contain;
overflow-anchorスクロール位置のずれ防止overflow-anchor: none;
cursorマウスカーソルの形状cursor: pointer; / cursor: grab;
pointer-eventsクリック・ホバーの有効/無効pointer-events: none;
user-selectテキスト選択の可否user-select: none;
touch-actionタッチ操作の制御touch-action: pan-y;

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


その他のよく使うプロパティ

リスト、テーブル、疑似要素、カラムレイアウト等に関するプロパティです。

プロパティ説明使用例
list-styleリストの記号スタイルlist-style: none; / list-style: disc inside;
content::before/::afterで内容を挿入content: ''; / content: attr(data-label);
counter-reset / counter-incrementCSSカウンターcounter-reset: section; counter-increment: section;
caption-sideテーブルキャプションの配置caption-side: bottom;
empty-cellsテーブル空セルの表示empty-cells: hide;
column-countマルチカラムの列数column-count: 3;
column-gapカラム間の隙間column-gap: 2rem;
column-ruleカラム間の罫線column-rule: 1px solid #ddd;
clip-path要素を特定の形状に切り抜くclip-path: circle(50%); / polygon()
mask-image要素にマスクを適用mask-image: linear-gradient(black, transparent);
appearanceフォーム要素のデフォルトスタイル除去appearance: none;
caret-colorテキスト入力カーソルの色caret-color: #3460fb;
resizeテキストエリア等のリサイズ可否resize: vertical;

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


モダンCSS(2024〜2026年の新機能)

近年ブラウザに実装された最新のCSS機能です。主要ブラウザの対応状況はCan I Useで確認してください。

プロパティ説明使用例
CSS Nestingセレクタのネスト(入れ子)記法.card { & .title { color: blue; } }
:has()親・兄弟要素の状態で選択.card:has(img) { padding: 0; }
:is() / :where()セレクタの一括指定:is(h1, h2, h3) { margin-top: 2rem; }
@layerCSSの優先順位をレイヤーで管理@layer base, components, utilities;
@scopeスコープ付きスタイルの定義@scope (.card) { h2 { font-size: 1.5rem; } }
subgrid親Gridのトラックを子要素が継承grid-template-rows: subgrid;
anchor positioning他の要素を基準にした配置anchor-name: --tooltip; position-anchor: --tooltip;
view-transition-nameView Transitions APIでの遷移対象指定view-transition-name: hero-image;
content-visibility画面外要素の描画を遅延content-visibility: auto;
contain-intrinsic-sizecontent-visibility使用時のサイズヒントcontain-intrinsic-size: 0 500px;
field-sizingフォーム要素のサイズ自動調整field-sizing: content;
text-wrap: balance見出し等のテキスト折り返しを均等化text-wrap: balance;
text-wrap: pretty段落テキストの最終行を改善text-wrap: pretty;
color-mix()2色を混合して新しい色を生成background: color-mix(in oklch, blue, white 30%);
light-dark()ライト/ダークモードで色を切り替えcolor: light-dark(#333, #ccc);
@starting-style要素出現時の初期スタイル(遷移用)@starting-style { .modal { opacity: 0; } }
interpolate-sizeautoへのアニメーションを有効化interpolate-size: allow-keywords;

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


カスタムプロパティ・CSS関数

CSS変数(カスタムプロパティ)と便利なCSS関数のリファレンスです。

プロパティ説明使用例
--変数名(カスタムプロパティ)CSS変数を定義:root { --color-primary: #3460fb; }
var()CSS変数の値を参照color: var(--color-primary, #000);
calc()計算式で値を指定width: calc(100% - 2rem);
clamp()最小・推奨・最大値を指定font-size: clamp(16px, 2vw, 24px);
min() / max()値の最小・最大を選択width: min(100%, 800px);
env()環境変数を参照(セーフエリア等)padding-bottom: env(safe-area-inset-bottom);
url()外部リソースのパスを指定background-image: url('/img/bg.webp');
rgb() / hsl() / oklch()色の指定関数color: oklch(0.65 0.2 250);

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。


関連記事

HTMLタグの正しい使い方もあわせて確認しましょう。

HTMLタグ一覧【カテゴリ別・使用例付きリファレンス】

WordPress関数一覧【テーマ・プラグイン開発向け使用例付きリファレンス】

コードの差分を比較したいときは Diff Checker(コード比較ツール) もご活用ください。