导航栏制作

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
	<title>CSS制作立体导航</title>
	<link rel="stylesheet" href="http://www.w3cplus.com/demo/css3/base.css">
	<style>
		body{
		  background: #ebebeb;
		}
		.nav{
		  width:560px;
		  height: 50px;
		  font:bold 0/50px Arial;
		  text-align:center;
		  margin:40px auto 0;
	      background: #f65f57;
		  /*制作圆*/
		  border-radius:5px;
          /*制作导航立体风格*/
          box-shadow:3px 6px 2px #AF3A30;
		}
		.nav a{
		  display: inline-block;
		  -webkit-transition: all 0.2s ease-in;
		  -moz-transition: all 0.2s ease-in;
		  -o-transition: all 0.2s ease-in;
		  -ms-transition: all 0.2s ease-in;
		  transition: all 0.1s ease-in;
		}
		.nav a:hover{
		  -webkit-transform:rotate(10deg);
		  -moz-transform:rotate(10deg);
		  -o-transform:rotate(10deg);
		  -ms-transform:rotate(10deg);
		  transform:rotate(10deg);
		}
		.nav li{
		  position:relative;
		  display:inline-block;
		  padding:0 16px;
		  font-size: 13px;
		  text-shadow:1px 2px 4px rgba(0,0,0,.5);
          list-style: none outside none;
		}
		/*使用伪元素制作导航列表项分隔线*/
		.nav li::after{
    	  content:"";
          height:20px;
          width:2px;
          top:15px;
          right:0px;
          position:absolute;
          background:linear-gradient(to bottom,#D45A50,#D65A50);
		}
        /*删除第一项和最后一项导航分隔线*/
		.nav li:last-child::after{
    	    display:none;   
		}
		.nav a,
		.nav a:hover{
		  color:#fff;
		  text-decoration: none;
		}
    </style>
</head>
<body>
	<ul class="nav">
    	<li><a href="">Home</a></li>
    	<li><a href="">About Me</a></li>
    	<li><a href="">Portfolio</a></li>
    	<li><a href="">Blog</a></li>
    	<li><a href="">Resources</a></li>
    	<li><a href="">Contact Me</a></li>
    </ul>
</body>
</html>

效果图:


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值