简单的导航条 变背景色

Original 2019-03-11 16:52:40 226
abstract:<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style> *{ margin: 0; padding: 0; } .nav{ height: 40px; bac

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

<style>

*{

margin: 0;

padding: 0;

}

.nav{

height: 40px;

background: #ccc;

}

.nav ul{

width: 500px;

margin: auto;

}

.nav ul li{

list-style: none;

width:100px;

height:40px ;

float:left;

line-height: 40px;

text-align: center;

color: white;

}

.nav ul li:hover{

background: pink;

color: yellow;

}

</style>

</head>

<body>

<div class="nav">

<ul>

<li>导航1</li>

<li>导航2</li>

<li>导航3</li>

<li>导航4</li>

<li>导航5</li>

</ul>

</div>

</body>

</html>



Correcting teacher:韦小宝Correction time:2019-03-11 17:05:44
Teacher's summary:一个网站的导航对于网站来说是非常重要的部分 在写导航的时候一定要注意到美观

Release Notes

Popular Entries