CSS Properties (rating properties)

Source: Internet
Author: User
Tags define
CSS If you have used word, you must know that word has a "bullets and numbering" feature.


in HTML, you do not need to initialize fonts, colors, margins, padding, and so on by using some of the fonts, colors, and container properties mentioned earlier. Because in CSS, you have already provided a dedicated hierarchical attribute for grading.

The
rating property includes a number of properties such as "List-style" (List style), "List-item" (list items), and so on, let's take a look at the detailed list of rating attributes:

Let's look at an example of a hierarchical attribute, as shown in the following code:

<title> fenji css </title>
<style type= "Text/css The >//* definition css*//
<!--
P{display:block;white-space:normal}
//* defines the display property as "block", meaning it is displayed in the new area; The White-space property
Normal makes the multiple whitespace fit into a *//
Em{display:inline}
//* The display property of the EM is "inline" for the purpose of not wrapping the text display under its control *//
L  I{display:list-item;list-style:square}
//* defines the display property of Li as "List-item", which shows the inclusion of a symbol mark in the list item, and
The List-style property value is defined as square so that the list items are marked as squares *//
Img{display:block}//* define picture properties for block so that the picture opens in a new location *//
-->
</style >
<body>
<p><em>sample</em>text<em>sample</em> Text<em>sample</em>
Text<em>sample</em> text<em>sample</em></p>//* Define a piece of text *//
<ul>//* define list items *//<li>list-item 1</li>
<li>list-item 2</li> <li> List-item 3</li> </ul>
<p> alt= "invisible" ></p>//* define a picture *//
</body>

The previous code shows the following image:

We see that because the <p> attribute is defined as block, the text, list, and picture are opened in different places, the inline property makes the text do not wrap, and the List-style-type property value is square so that the symbol before the list item is square;
If we make some changes in the above code, we will show in another effect that we change the display property value of "EM" to block in

We see that the hierarchical properties can also achieve the layout of some of the functions, a few code changes can make a great change in the page. Try the other effects yourself!
I'll introduce you to the mouse properties in the next section.







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.