问题描述:

I am trying to set custom image as a bullet. when i am using background or background-image tag it is work but not align properly with list category. And when i am using list-style-image it is not displaying the image as a bullet.

Problem :

Css

Firebug

Image is also displaying in firebug when i move my mouse over on it

Wrong final output

Solution :

Correct Output what i want

网友答案:

Here's one method, using a background image as the bullet instead. I made a quick jsfiddle to demonstrate it

li {
    height: 19px;
    margin: 10px 0; /* not needed, just to add space between the li's */
    background: url('../images/vmgeneral/errow.png') no-repeat left center;
    list-style: none; /* Get rid of the default bullet points */
    padding-left: 25px; /* Offsets the text. Needs to be at least the width of your image */
    line-height: 20px; /* Might have to play with this value a bit */
}
网友答案:

Put and li Class

and put class ' background link to the image as the bullet

相关阅读:
Top