首页htmlui_olHTML Element Style - 如何使用图像作为列表项目符号

HTML Element Style - 如何使用图像作为列表项目符号

我们想知道如何使用图像作为列表项目符号。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
ul {
  list-style-type: none;
}

li {
  background: orange;
  width: 200px;
  height: 50px;
  margin: 0 0 20px 0;
}

.left-image {
  float: left;
  width: 60px;
  height: 60px;
  border: dashed 2px black;
  background: url(http://www.w3cschool.cn/style/download.png) red;

}
</style>
</head>
<body>
  <ul>
    <li>
      <div class="left-image"></div> one
    </li>
    <li>
      <div class="left-image"></div> two
    </li>
    <li>
      <div class="left-image"></div> potato
    </li>
    <li>
      <div class="left-image"></div> four
    </li>
  </ul>
</body>
</html>