|
CSSで使用するプロパティの値と、このサイトとW3Cの説明で使用される書式。
|
・プロパティの値
- <family-name>
- "MS ゴシック", "Osaka"など。
- C:\WINDOWS\FONTSにあるもの?
- Windows98SEのメモ帳でフォント名のコピーが可能。
- <generic-family>
- serif
- sans-serif
- cursive
- fantasy
- monospace
- <url>
- url("ファイルパス")
- <number>
- [0-9]+ [.[0-9]+]{0, 1}
- <absolute-size>
- xx-small
- x-small
- small
- medium
- large
- x-large
- xx-large
- <relative-size>
- smaller
- larger
- <percentage>
- %
- <length>
- em
- ex
- px
- mm
- cm
- in
- pt
- pc
- <color>
- rgb([0-255], [0-255], [0-255])
- #[000000-FFFFFF]
- aqua
- black
- blue
- fuchsia
- gray
- green
- lime
- maroon
- navy
- olive
- purple
- red
- silver
- teal
- white
- yellow
|
・CSS2.1のプロパティの値
- <integer>
- [0-9]+ [.[0-9]+]{0, 1}
- inherit
- 要するに...
- 下記の文章はW3Cからの引用です。
- 6.2.1 The 'inherit' value
- Each property may also have a specified value of 'inherit', which means that,
- for a given element, the property takes the same computed value as the property for
- the element's parent. The 'inherit' value can be used to strengthen inherited values,
- and it can also be used on properties that are not normally inherited.
- Example(s):
- In the example below, the 'color' and 'background' properties are set on the BODY element.
- On all other elements, the 'color' value will be inherited and the background will be transparent.
- If these rules are part of the user's style sheet,
- black text on a white background will be enforced throughout the document.
- body {
- color: black !important;
- background: white !important;
- }
- * {
- color: inherit !important;
- background: transparent !important;
- }
|
・解説中で使われる書式
| < 〜 > | 値の種類。 |
| | | 1つのみ選択。 |
| || | 1つ以上選択。 |
| [ 〜 ] | グループ化。優先順位を決められる。 |
| * | 0回以上の繰り返し。 |
| + | 1回以上の繰り返し。 |
| ? | 1回以下の指定が可能。 |
| {a, b} | a回以上, b回以下の繰り返し。 |
|