Body {
Font-size:0.8em;
Color:navy;
}
Above means setting the Font-size font size and color font for the body selector.
So basically, when it works with HTML pages, the text color between the body tag (the contents of the entire window) is Navy font size is 0.8ems.
Length and percentage
CSS has many property values to specify units, but some of the basic units are used on some attributes, before they are worth the attribute.
Em such as font-size:2em to the size of the font calculation, so 2em is the actual font size twice times.
px such as font-size:12px is a unit of pixel pixels.
PT such as FONT-SIZE:12PX is the unit of the points pound.
% such as font-size:80% is percent
Other units include PC (12-point Latin), cm (cm), mm (mm) and in (inches)
When the value is zero, no units are required, for example: border:0 meaning no border.
Web pages are not static, absolute media. This means that the internal energy is retractable and the user should be allowed to adjust the way they like, including the font size and screen size.
Because of this, it is recommended to use "em" and "%" on the font-size (width and height), compared to the lower PX can not be changed in most browsers size, so use less, you can use the size of the border.
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.