纯CSS3 按钮式菜单导航

<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>石家庄车库门</title>
<style type="text/css">
nav{display: block; width: 100%; overflow: hidden;}
nav ul{margin: 80px 0 20px 0; padding: .7em; float: left; list-style: none; background: #444; background: rgba(0,0,0,.2); -moz-border-radius: .5em; -webkit-border-radius: .5em; border-radius: .5em; -moz-box-shadow: 0 1px 0 rgba(255,255,255,.2), 0 2px 1px rgba(0,0,0,.8) inset; -webkit-box-shadow: 0 1px 0 rgba(255,255,255,.2), 0 2px 1px rgba(0,0,0,.8) inset; box-shadow: 0 1px 0 rgba(255,255,255,.2), 0 2px 1px rgba(0,0,0,.8) inset;}
nav li{float:left;}
nav a{float:left; padding: .8em 1.5em; text-decoration: none; color: #555; text-shadow: 0 1px 0 rgba(255,255,255,.5); font: bold 1.1em/1 'trebuchet MS', Arial, Helvetica; letter-spacing: 1px; text-transform: uppercase; border-width: 1px; border-style: solid; border-color: #fff #ccc #999 #eee; background: #c1c1c1; background: -moz-linear-gradient(#f5f5f5, #c1c1c1); background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#c1c1c1)); background: -webkit-linear-gradient(#f5f5f5, #c1c1c1); background: -o-linear-gradient(#f5f5f5, #c1c1c1); background: -ms-linear-gradient(#f5f5f5, #c1c1c1); background: linear-gradient(#f5f5f5, #c1c1c1);}
nav a:hover, nav a:focus{outline: 0; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.2); background: #fac754; background: -moz-linear-gradient(#fac754, #f8ac00); background: -webkit-gradient(linear, left top, left bottom, from(#fac754), to(#f8ac00)); background: -webkit-linear-gradient(#fac754, #f8ac00); background: -o-linear-gradient(#fac754, #f8ac00); background: -ms-linear-gradient(#fac754, #f8ac00); background: linear-gradient(#fac754, #f8ac00);}
nav a:active{-moz-box-shadow: 0 0 2px 2px rgba(0,0,0,.3) inset; -webkit-box-shadow: 0 0 2px 2px rgba(0,0,0,.3) inset; box-shadow: 0 0 2px 2px rgba(0,0,0,.3) inset;}
nav li:first-child a{border-left: 0; -moz-border-radius: 4px 0 0 4px; -webkit-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px;}
nav li:last-child a{border-right: 0; -moz-border-radius: 0 4px 4px 0; -webkit-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0;}
</style>
</head>
<body>
<nav>
    <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Categories</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Portfolio</a></li>
        <li><a href="#">Contact</a></li>
    </ul>
</nav>
</body>
</html>

 

转载于:https://www.cnblogs.com/youtianxia/p/3825542.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值