2. 色・背景
テキストや背景色、背景画像などの色や背景装飾に関わるプロパティです。
- accent-color
- フォーム要素などの強調色を指定。例: accent-color: #007BFF;
- background-attachment
- 背景画像を固定するかどうか。例: background-attachment: fixed;
- background-blend-mode
- 背景画像や背景色の合成モード。例: background-blend-mode: multiply;
- background-clip
- 背景の描画範囲を指定。例: background-clip: content-box;
- background-color
- 要素の背景色。例: background-color: #fff;
- background-image
- 背景画像を指定。例: background-image: url("bg.png");
- background-origin
- 背景画像の原点を指定。例: background-origin: border-box;
- background-position
- 背景画像の表示位置。例: background-position: center;
- background-repeat
- 背景画像の繰り返し設定。例: background-repeat: no-repeat;
- background-size
- 背景画像の拡大・縮小。例: background-size: cover;
- color
- 文字の色を指定。例: color: #333;
- object-fit
- 画像や動画を要素枠にフィット。例: object-fit: cover;
- object-position
- object-fit時の画像の表示位置。例: object-position: center;
3. ボックスモデル
要素の幅・高さ・余白・枠線など、ボックスモデルに関わるプロパティです。
- aspect-ratio
- 要素の縦横比を指定。例: aspect-ratio: 16/9;
- border
- 枠線を一括指定。例: border: 1px solid #ccc;
- border-bottom
- 下辺の枠線を指定。例: border-bottom: 2px dashed #000;
- border-color
- 枠線の色を指定。例: border-color: #f00;
- border-image
- 画像を枠線として適用。例: border-image: url("border.png") 30 round;
- border-image-outset
- 画像枠線を要素外にはみ出させる量。例: border-image-outset: 5px;
- border-image-repeat
- 画像枠線の繰り返し方法。例: border-image-repeat: round;
- border-image-slice
- 画像枠線の分割位置。例: border-image-slice: 30;
- border-image-source
- 画像枠線に使う画像。例: border-image-source: url("border.png");
- border-image-width
- 画像枠線の幅。例: border-image-width: 10px;
- border-left
- 左辺の枠線を指定。例: border-left: 2px solid #000;
- border-radius
- 角を丸める。例: border-radius: 10px;
- border-right
- 右辺の枠線を指定。例: border-right: 2px solid #000;
- border-style
- 枠線のスタイルを指定。例: border-style: dotted;
- border-top
- 上辺の枠線を指定。例: border-top: 2px solid #000;
- border-width
- 枠線の太さを指定。例: border-width: 2px;
- box-sizing
- 幅・高さの計算方法を指定。例: box-sizing: border-box;
- margin
- 外側余白を一括指定。例: margin: 10px;
- margin-bottom
- 下側の余白を指定。例: margin-bottom: 10px;
- margin-left
- 左側の余白を指定。例: margin-left: 20px;
- margin-right
- 右側の余白を指定。例: margin-right: 20px;
- margin-top
- 上側の余白を指定。例: margin-top: 10px;
- max-height
- 要素の最大高さを指定。例: max-height: 400px;
- max-width
- 要素の最大幅を指定。例: max-width: 800px;
- min-height
- 要素の最小高さを指定。例: min-height: 100px;
- min-width
- 要素の最小幅を指定。例: min-width: 200px;
- padding
- 内側余白を一括指定。例: padding: 10px 20px;
- padding-bottom
- 下側の内側余白。例: padding-bottom: 10px;
- padding-left
- 左側の内側余白。例: padding-left: 20px;
- padding-right
- 右側の内側余白。例: padding-right: 20px;
- padding-top
- 上側の内側余白。例: padding-top: 10px;
4. レイアウト
要素の表示モードや位置指定、回り込みなどのレイアウト構造に関わるプロパティです。
- bottom
- 絶対/固定配置時の下位置。例: bottom: 10px;
- break-inside
- 要素内での分割を回避。例: break-inside: avoid;
- clear
- 浮動要素との回り込み解除。例: clear: both;
- display
- 表示方式を指定。例: display: block;
- float
- 要素を左右に回り込ませる。例: float: left;
- left
- 絶対/固定配置時の左位置。例: left: 20px;
- position
- 要素の配置方法。例: position: absolute;
- resize
- 要素をリサイズ可能にする。例: resize: both;
- right
- 絶対/固定配置時の右位置。例: right: 20px;
- top
- 絶対/固定配置時の上位置。例: top: 10px;
- z-index
- 要素の重なり順序。例: z-index: 999;
5. テーブルレイアウト
HTMLテーブルの装飾や表示を制御するためのプロパティです。
- border-collapse
- 隣接セルの枠線を結合するか指定。例: border-collapse: collapse;
- border-spacing
- セル間のスペースを指定。例: border-spacing: 5px;
- caption-side
- テーブルキャプションの位置。例: caption-side: bottom;
- empty-cells
- 空セルの表示を制御。例: empty-cells: show;
- table-layout
- テーブルのレイアウト方法。例: table-layout: fixed;
8. アニメーション関連
要素を動かしたり変化させたりするアニメーションやトランジションに関わるプロパティです。
- animation
- アニメーションを一括指定。例: animation: slide 2s infinite;
- animation-delay
- アニメーション開始の遅延時間。例: animation-delay: 0.5s;
- animation-direction
- 再生方向を指定。例: animation-direction: alternate;
- animation-duration
- アニメーション継続時間。例: animation-duration: 1s;
- animation-fill-mode
- 終了後の状態を保持するか。例: animation-fill-mode: forwards;
- animation-iteration-count
- 繰り返し回数。例: animation-iteration-count: infinite;
- animation-name
- 使用するキーフレーム名。例: animation-name: fadeIn;
- animation-play-state
- 再生/一時停止を制御。例: animation-play-state: paused;
- animation-timing-function
- アニメーションの進行速度カーブ。例: animation-timing-function: ease-in-out;
- transition
- トランジションを一括指定。例: transition: all 0.3s ease;
- transition-delay
- トランジション開始の遅延。例: transition-delay: 0.2s;
- transition-duration
- トランジションの継続時間。例: transition-duration: 0.5s;
- transition-property
- トランジション対象のプロパティ。例: transition-property: opacity;
- transition-timing-function
- 速度カーブを指定。例: transition-timing-function: linear;
9. 変形・視覚効果
要素を回転・拡大縮小・透過させたり、視覚的な特殊効果を付与するプロパティです。
- box-shadow
- 要素に影をつける。例: box-shadow: 0 4px 6px rgba(0,0,0,0.2);
- filter
- 要素にフィルタ効果(ぼかし等)を適用。例: filter: blur(5px);
- isolation
- ブレンド効果を要素内で完結させる。例: isolation: isolate;
- mix-blend-mode
- 重なった要素同士の合成モード。例: mix-blend-mode: multiply;
- transform
- 要素を変形。例: transform: rotate(45deg);
- transform-origin
- 変形の基準点。例: transform-origin: 50% 50%;
10. リスト装飾
ulやolなどのリスト表示を制御するためのプロパティです。
- counter-increment
- カウンターを増分。例: counter-increment: section;
- counter-reset
- カウンターをリセット。例: counter-reset: section;
- list-style
- リストマーカーの一括指定。例: list-style: square inside;
- list-style-image
- マーカーとして使用する画像。例: list-style-image: url("marker.png");
- list-style-position
- マーカーの表示位置。例: list-style-position: inside;
- list-style-type
- マーカーの種類を指定。例: list-style-type: disc;
11. スクロール関連
要素のオーバーフロー(はみ出し)やスクロール挙動を制御するプロパティです。
- overflow
- 要素からはみ出した部分の表示制御。例: overflow: hidden;
- overflow-x
- 水平方向のオーバーフローを制御。例: overflow-x: scroll;
- overflow-y
- 垂直方向のオーバーフローを制御。例: overflow-y: auto;
- scroll-behavior
- スクロール時のアニメーションを指定。例: scroll-behavior: smooth;
- scroll-margin
- スクロールスナップ時の外側余白。例: scroll-margin: 20px;
- scroll-margin-bottom
- 下方向のスクロール余白。例: scroll-margin-bottom: 10px;
- scroll-margin-left
- 左方向のスクロール余白。例: scroll-margin-left: 10px;
- scroll-margin-right
- 右方向のスクロール余白。例: scroll-margin-right: 10px;
- scroll-margin-top
- 上方向のスクロール余白。例: scroll-margin-top: 10px;
- scroll-padding
- スクロールスナップ時の内側余白。例: scroll-padding: 15px;
- scroll-snap-align
- スナップ位置を指定。例: scroll-snap-align: start;
- scroll-snap-stop
- ユーザーの強制スクロール停止可否。例: scroll-snap-stop: always;
- scroll-snap-type
- スクロールスナップの設定。例: scroll-snap-type: x mandatory;
- scrollbar-color
- スクロールバーの色(Firefox限定)。例: scrollbar-color: #000 #ccc;
- scrollbar-width
- スクロールバーの幅(Firefox限定)。例: scrollbar-width: thin;
- touch-action
- タッチ操作時の挙動を制御。例: touch-action: pan-y;