CSS:CSS units

Source: Internet
Author: User

YLBTECH-CSS:CSS units

1. back to top
1. Size
Unit Description
% Percentage
Inch Inches
Cm Cm
Mm Mm
Em

1em equals the current font size.

2em equals twice times the current font size.

For example, if an element is displayed in 12pt, then 2EM is 24pt.

in CSS, EM is a very useful unit because it automatically adapts to the font that the user uses .

Ex An ex is a font of x-height. (X-height is usually half the size of the font.) )
Pt LBS (1 pt equals 1/72 inches)
Pc 12-point movable (1 pc equals 12 points)
Px Pixel (a point on the computer screen)
Color
Unit Description
(color name) Color name (e.g. red)
RGB (X,X,X) RGB values (such as RGB (255,0,0))
RGB (x, x, x) RGB percent value (such as RGB (100%,0%,0%))
#rrggbb hexadecimal number (e.g. #ff0000)
2.
2. back to top
3. back to top
4. back to top
5. back to top
1, HTTP://WWW.W3SCHOOL.COM.CN/CSSREF/CSS_UNITS.ASP2,
6. back to top
Ylbtech
Source: http://ylbtech.cnblogs.com/
This article is copyright to the author and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original link, otherwise reserves the right to pursue legal responsibility.

CSS:CSS units

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.