mozilla

Revision 105847 of Units

  • Revision slug: CSS-2_Quick_Reference/Units
  • Revision title: Units
  • Revision id: 105847
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 35 words added

Revision Content

 

Relative Length Units : em, ex, px

  • em : 1 em is equivalent to the font-size
  • ex : 1 ex is equivalent to the x-height of the font
  • px : Pixel
  • ch : 1 ch is equivalent to the width of the character "0" in the current font ({{ fx_minversion_inline("3") }})

Absolute Length Units : in, cm, mm, pt, pc

  • in : Inch
  • cm : Centimeter
  • mm : Millimeter
  • pt : Point
  • pc : Pica

Color Units : #336699, #fa5, rgb(127,255,0), rgb(40%,50%,60%)

  • #306090 : Red is 30 hex, green is 60 hex, blue is 90 hex.
  • #fa5 : Red is FF hex, green is AA hex, blue is 55 hex.
  • rgb(127,255,0) : Red is 127, green is 255, blue is 0.
  • rgb(40%,50%,60%) : Red is 40%, green is 50%, blue is 60%.

 

Revision Source

<p> </p>
<p><small> <strong>Relative Length Units : em, ex, px</strong> </small></p>
<ul> <li>em : 1 em is equivalent to the font-size</li> <li>ex : 1 ex is equivalent to the x-height of the font</li> <li>px : Pixel</li> <li>ch : 1 ch is equivalent to the width of the character "0" in the current font ({{ fx_minversion_inline("3") }})</li>
</ul>
<p><strong>Absolute Length Units : in, cm, mm, pt, pc</strong></p>
<ul> <li>in : Inch</li> <li>cm : Centimeter</li> <li>mm : Millimeter</li> <li>pt : Point</li> <li>pc : Pica</li>
</ul>
<p><strong>Color Units : #336699, #fa5, rgb(127,255,0), rgb(40%,50%,60%)</strong></p>
<ul> <li>#306090 : Red is 30 hex, green is 60 hex, blue is 90 hex.</li> <li>#fa5 : Red is FF hex, green is AA hex, blue is 55 hex.</li> <li>rgb(127,255,0) : Red is 127, green is 255, blue is 0.</li> <li>rgb(40%,50%,60%) : Red is 40%, green is 50%, blue is 60%.</li>
</ul>
<p> </p>
Revert to this revision