This is an OS-independent and cross-browser way of literally telling the browsers to render the letters at exactly the number of pixels in height that you specified. Setting the font size in pixel values ( px) is a good choice when you need pixel accuracy. By setting a keyword font size on the body element, you can set relative font-sizing everywhere else on the page, giving you the ability to easily scale the font up or down on the entire page accordingly. Keywords are a good way to set the size of fonts on the web. Choose the appropriate method based on the needs for the particular web page. There are several ways to specify the font size, with keywords or numerical values for pixels or ems. = xx-small | x-small | small | medium | large | x-large | xx-large However, if such absolute values must be used, px are preferred over other units because their meaning does not vary depending on what the operating system thinks (generally incorrectly) the resolution of the monitor is. It is best to use values that are relative to the user's default font size, and avoid absolute values such as lengths with units other than em or ex. values refer to the parent element's font size. When the units are specified in rem, the size is defined relative to the size of the font used by the (root) element. For example, 0.5em is half the font size of the parent of the current element. When the units of values are specified in em or ex, the size is defined relative to the size of the font on the parent element of the element in question. larger, smaller Larger or smaller than the parent element's font size, by roughly the ratio used to separate the absolute size keywords above. Similar to presentational HTML's through where the user's default font size is. Values xx-small, x-small, small, medium, large, x-large, xx-large A set of absolute size keywords based on the user's default font size (which is medium). as a single keyword chosen either from the list of absolute-size keywords or from the list of relative-size keywords.The font-size property is specified in one of two ways: The unique non-ambiguous order defined by the formal grammar It also applies to ::first-letter and ::first-line.Īs specified, but with relative lengths converted into absolute lengths
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |