前端制作动态导航案例1

动态导航案例1

导航效果:
在这里插入图片描述
代码示例:

<!DOCTYPE html>
<html lang="en">
	<head>
	    <meta charset="utf-8">
	    <style>
	        *{margin:0;padding:0;}
	        ul,li{list-style: none;}
	        a{text-decoration: none;}
	        /*nav1*/
	        .nav1{
	            width: 480px;
	            height: 40px;
	            border-bottom:1px solid #a0a0a0;
	            margin:100px auto;
	            display: none;
	            display: block;
	            /*background: pink;*/
	        }
	        .nav1 li{
	        float: left;
	            margin-right: 9px;
	            /*background: red;*/
	        }
	        .nav1 a{
	            display: block;
	            height: 35px;
	            line-height: 35px;
	            padding: 0px 14px;
	            background: #f7f7f7;
	            font-size: 10px;
	            color:#91989e;
	            border:1px solid #cecece;
	            border-bottom: 0;
	            margin-top:4px;
	        }
	        .nav1 a:hover{
	            height: 40px;
	            border-color: #9c9c9c;
	            color:#6b767b;
	            margin-top:0;
	            background: #fff;
	            line-height: 40px;
	        }
	    </style>
	</head>
	<body>
	    <!-- nav1 -->
	    <ul class="nav1">
	        <li><a href="#">tab one</a></li>
	        <li><a href="#">tab two</a></li>
	        <li><a href="#">tab three</a></li>
	        <li><a href="#">tab four</a></li>
	    </ul>
	</body>
</html>

除了这种动态导航以外还有其他动态导航案例如下:

案例2:点击查看案例2
在这里插入图片描述
案例3:点击查看案例3在这里插入图片描述

总结

以上是对前端制作动态导航的小总结,后期将继续更新html基础知识点
文章为原创内容,要是遇到有不合适的地方欢迎赐教🙌

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值