Home > Web Front-end > CSS Tutorial > css uses list-style-type attribute to display behind the text

css uses list-style-type attribute to display behind the text

黄舟
Release: 2017-06-29 13:45:34
Original
1863 people have browsed it

css uses the list-style-type attribute to display it behind the text.

What is the problem with the black dot displayed at the date?

css uses list-style-type attribute to display behind the text

In the first case, directly modify list-style-position:outside; to list-style-position:inside; if not, add it.

Method 2: Leave a place for the list symbol to display in the case of list-style-position:outside;, for example, add an attribute to li margin-left: 50px; In both cases, simply delete the floating element float.

Extension: list-style-type: define list style
disc: point
circle: circle
square: square
decimal: number, such as 1, 2, 3,,....,11,12,13
decimal-leading-zero: Decimal number, less than two digits are filled with leading 0, for example: 01, 02, 03, ..., 98, 99
lower-roman: Lowercase Roman characters, such as: i, ii, iii, iv, v, ...
upper-roman: Uppercase Roman characters, such as: I, II, III, IV, V, ... .
lower-greek: Lowercase Greek letters, for example: α(alpha), β(beta), γ(gamma), ...
lower-latin: Lowercase Latin letters, for example: a, b, c , ... z
upper-latin: Uppercase Latin, for example: A, B, C, ... Z
armenian: Armenian numerals
georgian: Georgian numerals, for example: an, ban, gan , ..., he, tan, in, in-an, ...
lower-alpha: lowercase Latin, for example: a, b, c, ... z
upper-alpha: uppercase Latin Text, for example: A, B, C, ... Z
none: None (cancel all list styles)
inherit: inheritance
Custom image: list-style:square inside url

Abbreviation rules: list-style: square inside url('arrow.gif'); The blue square in the front is the list symbol list-style-type, the red inside in the middle is the list-style-position locator, and the last one is the list-style-position locator. The green url is the image path list-style-image. If this image exists, it will overwrite the previous square. If it does not exist, it will be displayed with square.

.cen5 li a{display:inline-block;width:480px;height:20px;line-height:20px;margin-top:3px}
.ileft{display:inline-block}
Copy after login

You can write a black dot in front of the text, or upload a picture, such as

  • Contact

  • You can upload a background image in i,

    The above is the detailed content of css uses list-style-type attribute to display behind the text. For more information, please follow other related articles on the PHP Chinese website!

    Related labels:
    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