设置文本和列表中标记之间的距离。
为标记指定图像,而不使用数字或项目符号。
控制标记的外观和形状。
将标记放置在包含列表项的框的外部或内部。
设置背景颜色以列出项目和列表。
list-style-type::此属性负责控制标记的外观和形状。
list-style-image::它设置标记的图像,而不是数字或项目符号。
list-style-position::它指定标记的位置。
list-style:是上述属性的简写属性。
marker-offset::用于指定文本和标记之间的距离。
<!DOCTYPE html>
<html>
<head>
<title>CSS Lists</title>
<style>
.num {
list-style-type: decimal;
}
.alpha {
list-style-type: lower-alpha;
}
.roman {
list-style-type: lower-roman;
}
.circle {
list-style-type: circle;
}
.square {
list-style-type: square;
}
.disc {
list-style-type: disc;
}
</style>
</head>
<body>
<h1>
Welcome to the bianchenghao6.com
</h1>
<h2>
Ordered Lists
</h2>
<ol class="num">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<ol class="alpha">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<ol class="roman">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<h2>
Unordered lists
</h2>
<ul class="disc">
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
<ul class="circle">
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
<ul class="square">
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS Lists</title>
<style>
.num {
list-style-type: decimal;
list-style-position: inside;
}
.roman {
list-style-type: lower-roman;
list-style-position: outside;
}
.circle {
list-style-type: circle;
list-style-position: inside;
}
.square {
list-style-type: square;
}
.disc {
list-style-type: disc;
list-style-position: inside;
}
</style>
</head>
<body>
<h1>
Welcome to the bianchenghao6.com
</h1>
<h2>
Ordered Lists
</h2>
<ol class="num">
<li>INSIDE</li>
<li>two</li>
<li>three</li>
</ol>
<ol class="roman">
<li>OUTSIDE</li>
<li>two</li>
<li>three</li>
</ol>
<h2>
Unordered lists
</h2>
<ul class="disc">
<li>INSIDE</li>
<li>two</li>
<li>three</li>
</ul>
<ul class="circle">
<li>INSIDE</li>
<li>two</li>
<li>three</li>
</ul>
<ul class="square">
<li>DEFAULT</li>
<li>two</li>
<li>three</li>
</ul>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS Lists</title>
<style>
.order {
list-style-image: url(img.png);
}
.unorder {
list-style-image: url(img.png);
}
</style>
</head>
<body>
<h1>
Welcome to the bianchenghao6.com
</h1>
<h2>
Ordered Lists
</h2>
<ol class="order">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<h2>
Unordered lists
</h2>
<ul class="unorder">
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS Lists</title>
<style>
.order {
list-style: lower-alpha inside url(img.png);
}
.unorder {
list-style: disc outside;
}
</style>
</head>
<body>
<h1>
Welcome to the bianchenghao6.com
</h1>
<h2>
Ordered Lists
</h2>
<ol class="order">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<h2>
Unordered lists
</h2>
<ul class="unorder">
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS Lists</title>
<style>
.order {
list-style: upper-alpha;
background: pink;
padding: 20px;
}
.order li {
background: lightblue;
padding: 10px;
font-size: 20px;
margin: 10px;
}
.unorder {
list-style: square inside;
background: cyan;
padding: 20px;
}
.unorder li {
background: green;
color: white;
padding: 10px;
font-size: 20px;
margin: 10px;
}
</style>
</head>
<body>
<h1>
Welcome to the bianchenghao6.com
</h1>
<h2>
Ordered Lists
</h2>
<ol class="order">
<li>ONE</li>
<li>TWO</li>
<li>THREE</li>
</ol>
<h2>
Unordered lists
</h2>
<ul class="unorder">
<li>ONE</li>
<li>TWO</li>
<li>THREE</li>
</ul>
</body>
</html>