:before
을 사용하면 <li>
요소 앞에 이미지를 배치 할 수 있습니다.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Name of the page</title>
<meta http-equiv="content-type" content="text/html; charset=utf8">
<style type="text/css">
ul {
list-style: none;
}
li { }
li:before {
display: inline-block;
vertical-align: middle;
height: 64px;
width: 64px;
content: ' ';
background-image: url(bullet_64.png);
}
</style>
</head>
<body>
<ul>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ul>
</body>
</html>
글 머리 기호가 일반적으로 표시되는 왼쪽으로 더 배치해야하는 경우 여백을 추가하면됩니다.
IE8뿐 아니라 모든 최신 브라우저에서 작동합니다.
어떻게 했습니까? 'list-style-image' 또는'background-image'를 통해? – Gumbo
list-style-image – ArK