CSS list-style list properties
The CSS list-style list attribute is CSS that provides web designers with the ability to adjust the display of the list. The so-called list is HTML ul li project tag or HTML ol li project tag . It is also often called project tag or list in Chinese, not only for web designers, Even ordinary people often add these lists to the content to list information. The traditional ul li list or ol li list is relatively simple. The default value is arranged from top to bottom. ul li is a black dot at the beginning, ol li It is automatically generated at the beginning of the digital sorting. If the web designer wants to modify these lists, such as modifying the graphics at the beginning, changing the symbols at the beginning to a small picture display, or modifying the presentation position of the list, you can use the CSS list-style list property To redesign, the following is an example.
CSS list-style example 1: Modify the shape displayed at the beginning of the list (item tag)
<li>square</li>
<li>square</li>
</ul>
<ul style="list-style-type:upper-alpha; ">
<li>upper-alpha</li>
<li>upper-alpha</li>
</ul>
- square
- square
- upper-alpha
- upper-alpha
For detailed usage and shape selection, please refer to: CSS list-style-type .
CSS list-style example 2. Modify the list (item tag) with a small icon at the beginning
ul li {
list-style-image:url('upload/20130930173146.gif');
}
</style>
<ul>
<li>List of symbols starting with icons</ li>
<li>List of symbols starting with icons</li>
</ul>
- List with icons at the beginning
- List with icons at the beginning
CSS list-style property 3. Modify the display position of the list (item label)
ul.p1 {
list-style-position:inside;
}
ul.p2 {
list-style-position:outside;
}
li {
border:1px #cccccc solid;
}
</style>
<ul class="p1">
<li>This is displayed within the tag range</li>
<li>This is displayed within the tag range</li>
</ul>
<ul class="p2">
<li>This is displayed outside the label range</li>
<li>This is displayed outside the label range</li>
</ul>
Post a Comment
0 Comments