CSS list-style-position 속성은 목록 항목의 마커 위치를 설정하는 데 사용됩니다. 이 속성의 기본값은 목록 항목 외부에 마커를 설정하는 외부입니다.
구문
CSS list-style-position 속성의 구문은 다음과 같습니다 -
Selector {
list-style-position: /*value*/
} 예시
다음 예는 CSS list-style-property를 보여줍니다 -
<!DOCTYPE html>
<html>
<head>
<style>
li {
width: 50%;
margin: 5px;
font-size: 120%;
box-shadow: 0 0 3px 1px black;
background: url("https://www.tutorialspoint.com/dbms/images/dbms.jpg") no-repeat 32px 8px;
list-style-position: inside;
padding: 0 0 10px 20px;
}
ol ol li {
list-style: lower-roman;
list-style-position: outside;
}
</style>
</head>
<body>
<ol>
<li>Black</li>
<li>
Blue
<ol>
<li>Green</li>
<li>Red</li>
</ol>
</li>
<li>Yellow</li>
<li>Red</li>
</ol>
</body>
</html> 출력
이것은 다음 출력을 제공합니다 -

예시
<!DOCTYPE html>
<html>
<head>
<style>
ul {
width: 200px;
box-shadow: inset 0 0 6px green;
list-style-position: outside;
}
ul + ul {
list-style-type: circle;
list-style-position: inside;
}
</style>
</head>
<body>
<ul>
<li>demo</li>
<li>demo</li>
<li>demo</li>
</ul>
<ul>
<li>demo</li>
<li>demo</li>
<li>demo</li>
</ul>
</body>
</html> 출력
이것은 다음 출력을 제공합니다 -
