LI code format:
A) format the list with CSS: ul li {
List-style-type: none;
}
B) If you want to replace the list operator with an image, ul li {
List-style-type: none;
List-style-image: url (/blog/images/icon.gif );
}
C) For left alignment, use the following code: ul {
List-style-type: none;
Margin: 0px;
}
D) If you want to add a background color to the list, use the following code: ul {
List-style-type: none;
Margin: 0px;
}
Ul li {
Background: # CCC;
}
E). If you want to add the MOUSEOVER background color effect to the list, use the following code: ul {list-style-type: none; margin: 0px ;}
Ul li a {display: block; width: 100%; background: # ccc ;}
Ul li a: hover {background: #999;} Note: display: block; this line must be added to display the block! F) horizontal arrangement of elements in. LI, key FLOAT: LEFT: ul {
List-style-type: none;
Width: 100%;
}
Ul li {
Width: 80px;
Float: left;
}
<Ul> <li> Differences
<LI> parameter settings (commonly used): for example, <li type = "square" value = "4"> type = "square"
It is applicable only to the non-sequential list and has three types of Character styles. The values are set to type = "disc" as follows ":
The column symbol is used when type = "disc.
If "width = 10 height = 10> is the column entry symbol when type =" circle.
Symbol is the column entry symbol when type = "square.
Value = "4"
This parameter is only applicable to the sequential list. It sets the number of this item. Subsequent items increase progressively as the starting number, but the previous items are not affected. The value can only be 1, 2, 3 .. and has no internal value.
<UL> it is called an unordered list tag.
The unordered list is to add, and other symbols before each item, so it is also called the symbol list.
<UL> parameter settings (commonly used ):
Example: <UL type = "square"> type = "square"
Set the symbol style. The values are as follows ":
The column symbol is used when type = "disc.
The column symbol when type = "circle.
It is the column symbol when type = "square. <Ul> is the project list, <li> is the list item, and the project list is represented by symbols. Therefore, the default blackpoints are listed, another one is <ol>, which is a numbered list, which is listed by numbers, and <li> is also used as a list item. <li> is a list item, that is, a list item, there are two types of lists, so <ul> or <ol> must be used to distinguish Unordered Lists (small dots) and ordered lists (, 3 ...).
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