list-style in css is a shorthand attribute that covers all other list style attributes. The list-style attribute can be applied to any element and is inherited by the list-item element, such as [list-style:square inside url()].
The operating environment of this tutorial: Windows 10 system, CSS3, this article is applicable to all brands of computers.
list-style is a shorthand attribute used to set all list attributes in one declaration.
(Learning video recommendation: css video tutorial)
Detailed description:
This attribute is a shorthand attribute that covers all other list style attributes . Since it applies to all elements with display list-item, it can only be used on li elements in normal HTML and XHTML, but in fact it can be applied to any element and is inherited by list-item elements.
You can set the following attributes in order:
list-style-type list-style-position list-style-image
Attribute value:
list-style-type 设置列表项标记的类型。参阅:list-style-type 中可能的值。 list-style-position 设置在何处放置列表项标记。参阅:list-style-position 中可能的值。 list-style-image 使用图像来替换列表项的标记。参阅:list-style-image 中可能的值。 inherit 规定应该从父元素继承 list-style 属性的值。
Example:
Set the image in the list List item tag:
ul { list-style:square inside url('/i/arrow.gif'); }
Related recommendations: CSS tutorial
The above is the detailed content of What does list-style mean in css. For more information, please follow other related articles on the PHP Chinese website!