コンテンツにスキップ

Cascading Style Sheets

出典: フリー百科事典『ウィキペディア(Wikipedia)』
Cascading style sheetsから転送)
Cascading Style Sheets
拡張子.css
MIMEタイプtext/css
開発者World Wide Web Consortium
種別スタイルシート
国際標準CSS Level 1 (Recommendation),

CSS Level 2 (Recommendation),
CSS Level 2 Revision 1 (Recommendation),
Selectors Level 3 (Recommendation),
CSS Color Module Level 3 (Recommendation),

CSS Namespaces Module Level 3 (Recommendation),

Cascading Style SheetsCSSHTMLXMLWorld Wide Web Consortium (W3C) 

CSSHTML



 CSS[ 1]

CSS1994WWW

[]


2

CSS 便

[]


 CSS Level 2 CSS  CSS Level 1  CSS Level 2 CSS 

CSS
p#id { color: #ff3300 }
  • { から } までの部分を宣言ブロックという
  • p#idセレクタ(選択子)といい、スタイルが適用される対象をしめす
  • 宣言ブロックとセレクタを合わせて規則集合という
  • color: #ff3300 部分を宣言という
  • 宣言の内、: より前(上例では color )をプロパティ(特性)という
  • 宣言の内、: より後(上例では #ff3300 )をという

 CSS HTML ID: :  ; 

 HTML  idID p FF(=255)  33(=51)  0 
color: #ff3300;
width: 35%
color: "#0033ff";
width: '53%'

 "  ' "  ' color  #rrggbb rgb([0-255], [0-255], [0-255])  black  red 
p#id { color: #ff3300 }
p#id { font-size: 24px }

は、

p#id { color: #ff3300; font-size: 24px }

; 使 ; 

 CSS ID#id  [id="id"]  HTML( :link :hover :lang )

[]


CSS 





CSS1 




ID

ID




(一)

(二)

HTML  align CSS  CSS CSS1 

CSS264

(一) -  !important 

(二) -  !important 

(三)

(四)

(五)



(一)

(二)HTML  XML 

(三)CSS HTML 

[]


: Inheritance[1]

CSS 沿 <article><h2><div> 3 <article style="background: #a9a9a9;">  <article>CSS <article style="background: #a9a9a9;"><h2><div> <h2> 

[]


CSS 201111Level 1  Level 4 

Cascading Style Sheets, level 1 (CSS1),  199612[]







調
















マージン

ボーダー

パディング

内容

パディング

ボーダー

マージン


 width W3C 

 width [2] Internet Explorer 5.5  6.0  Internet Explorer Web0CSS使

Internet Explorer 6  DOCTYPE  XML  XHTML XML 

Cascading Style Sheets, level 2 (CSS2),  19985[]


CSS2  CSS1 

TV

2002CSSUACSS2.1 CSS2CSS2  CSS 2.1 

Cascading Style Sheets, level 2 revision 1 (CSS 2.1),  20116[]


CSS2 CSS2CSS2 text-shadow CSS2 display  run-in  CSS3 

CSS 2002 CSS2.1 

Cascading Style Sheets, level 3 (CSS3)[]

CSS3

CSS3CSS 2.1[3]HTML202311
CSS3の主要モジュール仕様書[4]
モジュール 仕様書タイトル 状態 日付
css3-background CSS Backgrounds and Borders Module Level 3  勧告候補草案 2023年2月
css-box-3 CSS Box Model Module Level 3 勧告 2023年4月
css-cascade-3 CSS Cascading and Inheritance Level 3  勧告 2021年2月
css-color-3 CSS Color Module Level 3 勧告 2022年1月
css3-content CSS Generated Content Module Level 3  草案 2019年8月
css-fonts-3 CSS Fonts Module Level 3 勧告 2018年9月
css3-gcpm CSS Generated Content for Paged Media Module 草案 2014年5月
css3-layout CSS Template Layout Module ノート 2015年3月
css3-mediaqueries  Media Queries 勧告 2012年6月
mediaqueries-4  Media Queries Level 4 勧告候補 2021年12月
css3-multicol  Multi-column Layout Module Level 1 勧告候補 2021年10月
css3-page CSS Paged Media Module Level 3 草案(一部はcss3-breakへ) 2018年10月
css3-break CSS Fragmentation Module Level 3 勧告候補 2018年12月
selectors-3 Selectors Level 3 勧告 2018年11月
selectors-4 Selectors Level 4 草案 2022年11月
css3-ui CSS Basic User Interface Module Level 3 (CSS3 UI) 勧告 2018年6月

Cascading Style Sheets, Level 4 (CSS4)以降[編集]


CSS4Level 4[3]

Level 4 Level 3 

Level 3Level 4Media Queries Level 4CSS Conditional Rules Module Level 4Level 56CSS Color Module Level 5CSS Cascading and Inheritance Level 6

CSS Snapshot[]


CSS Snapshot  CSS  (W3C Group Note) [5]

CCS 2.1  CSS  CSS CSS snapshot  W3C CSSWG  Group Note Group Note  W3C CSS Snapshot 2023

脚注[編集]

注釈[編集]

  1. ^ ただし拡張・修正の続いているCSS仕様の全てを完全に実装しているユーザーエージェントは事実上皆無といってよく、実際シェアで多数を占めるユーザーエージェントは部分対応にすぎない。しかし実用上支障のないレベルの実装はされてきており、なおかつ表現の互換性についても考慮されてきている。

[]



(一)^ "Inheritance propagates property values from parent elements to their children." W3C CSSWG. (2022). CSS Cascading and Inheritance Level 4, W3C Candidate Recommendation Snapshot, 13 January 2022.

(二)^ en:Internet Explorer box model bug

(三)^ abWorld Wide Web Consortium (14 February 2023). "2.4 CSS Levels". CSS Snapshot 2023 (). 20231121

(四)^ "All CSS specifications" (). W3C. 6 September 2023. 2023102220231121

(五)^ "CSS Snapshot 2023 ... This document collects together into one definition all the specs that together form the current state of Cascading Style Sheets (CSS) as of 2023." CSSWG. (2023). CSS Snapshot 2023.

[]



XSL

DSSSL





CSS
LESS

Sass

[]