Set image as li...LOGIN

Set image as list item marker

Example analysis:

The list-style-image attribute uses an image to replace the markup of the list item.

Note: This example does not display the same in all browsers, IE and Opera display the image tag a little higher than Firefox, Chrome and Safari.

Then if the same image logo is displayed in all browsers, a browser compatibility solution should be used. The next section introduces using browser compatibility solutions, please click "Continue Learning" to start learning.

Next Section
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> <style> ul { list-style-image:url('https://img.php.cn/upload/article/000/000/015/5c6e720242040312.gif'); } </style> </head> <body> <ul> <li>PHP</li> <li>JavaScript</li> <li>MySQl</li> </ul> </body> </html>
submitReset Code
ChapterCourseware