What should the font value of CSS be?

Source: Internet
Author: User

We have spent a lot of time learning HTML, CSS, JS in these four months, and we often use this property in CSS:

. Div1{border-left-width:1px;border-left-style:solid;border-left-color: #ddd;}. div2{padding-top:3px;padding-right:4px;padding-bottom:5px;padding-left:6px;}. div3{background-position:111px 222px;background-image:url (image.png); background-repeat:no-repeat; Background-color: #cfc;}

And we can merge them into this:

. div1{border-left:1px solid #ddd;}. div2{padding:3px 4px 5px 6px;}. div3{background:111px 222px URL (image.png) no-repeat #cfc;}

In the values of these properties, the order is indifferent, and the number is also variable, the middle can also omit some do not write, can also be a value for two properties, it seems normal, but there is a CSS property is a special case, that is, font.

Font:font-style¦¦font-variant¦¦font-weight¦¦font-size¦¦line-height¦¦font-family

Font Sets or retrieves the text attributes in an object. This property is a composite property. The default value is: normal normal normal medium normal "times New Roman". The first method of declaring a parameter must be arranged in the order shown above. Only one value is allowed per parameter. Ignores the default value of the standalone property whose arguments correspond to.

P {font:12px/14px Sans-serif}p {font:80% sans-serif}p {font:x-large/110% "New Century Schoolbook", serif}p {font : Bold Italic Large Palatino, serif}p {font:normal small-caps 120%/120% fantasy}p {font:oblique 12pt "Helvetica Nue" , serif; font-stretch:condensed}

And in addition to these sequential attributes, the size and family of the font are essential.

Summarize:

I don't know if I understand, I just follow my own understanding and look at some information, but if you do not set a value in the font, he will use the default value, and other properties will not have a value.

  

 

What should the font value of CSS be?

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.