Introduction to different attributes in Font (fonts) in CSS

Source: Internet
Author: User
This article brings to you the content is about the CSS font (font) in the different attributes of the introduction, there is a certain reference value, there is a need for friends to refer to, I hope you have some help.

Shorthand Order: style-variant-weight-size/line-height-family

eg

P{font:italic bold 12px/30px Georgia,serif;}

Note: The values for font-size and font-family are required.

Each property is described sequentially in order:

First, font-style:normal (default); Italic (italic); Oblique (tilt); inherit;

Italic is similar to oblique style, but oblique compatibility is not good.

Second, Font-variant:normall (default); Small-caps (Displays the font of small caps, meaning that all lowercase letters are converted to uppercase, but all letters using small-caps are smaller than the rest of the text); Inherit

Font-weight:normal (default, three); Bold (Bolder;lighter;inherit);

Font-size:medium (default, Medium), smaller (smaller size than parent element), larger (larger size than parent element); Length;%;inherit;

The attributes that are tied to medium are: Xx-small,x-small,small,meidium,large,x-large,xx-large.

Wu, font-family

eg

P{font-family: "Times New Roman", Time,serif;}

notation: (1) Each value is separated by a comma (2) If the font name contains spaces, it must be enclosed in double quotation marks. Use single quotation marks when using the "style" property in HTML.

Note: (1) on the computer screen, Sans-serif fonts are considered to be easier to read than serif fonts. (2) font-family has family-name (specified series) and generic-family (usually font family). Using a particular font depends entirely on whether the font is available on the user's machine, so it is highly recommended to use a common Word system column name as a fallback.

Related Article

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.