css3_圆角导航栏(2例)

css3圆角导航栏1
.................................................
<!DOCTYPE html5>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>圆角导航栏</title>
<style>
*{
padding: 0px;margin: 0px;
}
ul{
width: 600px;
height: 50px;
background-color: rgba(246,95,87,0.8);
border-radius: 5px;
box-shadow:5px 5px 5px 1px red;
}
ul>li{
float: left;
height: 50px;
width: 100px;
font-size: 16px;
color: white;
line-height: 50px;
text-align: center;
text-shadow: 2px 2px 0px blue;
list-style: none;
}
</style>
</head>
<body>

<div id="nav">
<ul>
<li>主页</li>
<li>专家薪资</li>
<li>高端课程</li>
<li>教学保障</li>
<li>企业招聘</li>
<li>高薪就业</li>
</ul>
</div>
</body>
</html>
...............................................................

css3圆角导航栏2
<!DOCTYPE html5>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>圆角导航栏2</title>
<style>
*{
padding: 0px;margin: 0px;
}
a{
text-decoration: none;
color: white;
}
ul{
width: 1200px;
height: 30px;
background-color: rgba(246,95,87,0.8);
border-radius: 5px;
box-shadow:5px 5px 5px 1px red;
margin-top: 10px;
}
li{
list-style:none;
width:200px;
height:30px;
/* border:1px solid red;*/
float:left;
line-height: 30px;
text-align: center;
}
li:after{

content: "";
display: block;
width: 2px;
height: 20px;
margin-top: 10px;
/*渐变色*/
background: linear-gradient(left,red,green,orange);
background: -webkit-linear-gradient(left,red,green,orange);
background: -moz-linear-gradient(left,red,green,orange);
margin-left: 200px;
margin-top: -24px;
}

li:last-of-type:after{
display: none;
}

</style>
</head>
<body>

<div id="nav">
<ul>
<li><a href="#">主页</a></li>
<li><a href="#">专家薪资</a></li>
<li><a href="#">高端课程</a></li>
<li><a href="#">教学保障</a></li>
<li><a href="#">企业招聘</a></li>
<li><a href="#">高薪就业</a></li>
</ul>
</div>

</body>
</html>











posted @ 2017-06-06 16:00  YoogaChan  阅读(1624)  评论(0编辑  收藏  举报