Home > Web Front-end > CSS Tutorial > 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

黄舟
Release: 2017-06-29 10:15:42
Original
4868 people have browsed it

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;
  }
Copy after login

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!

Related labels:
css
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template