Learn CSS Use tips tutorial (1) Overall statement

Source: Internet
Author: User
css| Skills | tutorials

  method of the whole declaration

  1. Basically, there are two ways to declare a whole, the first is to target a label, and then set several styles at a time. The second way is to set the same style for several tags at once. The following example is: "For a label, and then set several styles at a time":

<stype= "Text/css" >

body{font-size:9pt;
Font-color:red;
Background:white}

</style>

2.You will find that we also declare: The glyph size is 9pt, the glyph color is red, the background is white, these 3 styles, in order to separate these three styles, we use the semicolon ";" to separate it, so as to function properly! Of course, if you think such a column of writing is a waste of space, then you can also write a line of the form, as follows:

<style type= "Text/css" >

body{font-size:9pt; Font-color:red; Background:white}

</style>

  Several labels set the same style

  1. We have just seen a tag and set several styles, and in fact, we can also set several tags together, for example:

<style type= "Text/css" >

h1,h2,td{font-size:12pt; font-color:red font-family: Song Body }

</style>


In this case, we also set up three sets of tags

Next section: sub-item declaration



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.