今天主要学习列表标签:

default.html

列表分为三种:<1>有序列表   <2>无序列表   <3>自定义列表

配合CSS叠层样式可以做出查询标签

代码如下:

<!DOCTYPE html>

<html>

<head>

<style>

div{

width: 100%;

height: 50px;

background-color: green;

}

ul{

width: 500px;

height: 50px;

background-color: red;

}

li{width: 50px;

height:50px;

background-color: red;

float: left;

color: green;

list-style: none;

text-align: center;

line-height: 50px;

}

li:hover{

background-color: orange;

}

</style>

</head>

<body>

<div>

<ul>

<li>语文</li>

<li>数学</li>

<li>外语</li>

<li>历史</li>

<li>政治</li>

</ul>

</div>

</body>

</html>