Home  >  Article  >  Web Front-end  >  CSS: list-style-image sets an image as a list item markup in detail

CSS: list-style-image sets an image as a list item markup in detail

黄舟
黄舟Original
2017-06-29 10:15:424831browse

In CSS, the attribute of list-style-image is to set the image as a list item tag. This article introduces in detail the definition and usage of list-style-image, the syntax of list-style-image, and examples of list-style-image.

The role of the list-style-image attribute in CSS is to set the image as the list item mark.

list-style-image attribute example

Set the image as the item mark in the list:

ul
  {  list-style-image:url("/i/arrow.gif");
  list-style-type:square;
  }

list-style-image definition and usage

The list-style-image attribute replaces the markup of a list item with an image.

Description

This attribute specifies an image as a symbol for an ordered or unordered list item. The placement of the image relative to the list item content is typically controlled using the

list-style-position property.

Note: Always specify a "list-style-type" attribute in case the image is not available.

CSS: list-style-image sets an image as a list item markup in detail

The above is the detailed content of CSS: list-style-image sets an image as a list item markup in detail. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn