jQuery tab菜单切换

本文介绍了如何利用jQuery实现Tab菜单的切换效果。通过结合HTML、CSS3和JavaScript,创建了一个简洁而实用的Tab菜单。内容包括CSS样式定义、HTML结构布局以及jQuery脚本实现菜单的动态切换。
摘要由CSDN通过智能技术生成

运行效果如下图:
在这里插入图片描述
css部分:

 <style>
        * {
   
            margin: 0;
            padding: 0;
            list-style: none;
        }

        a {
   
            text-decoration: none;
        }

        ul {
   
            display: flex;
            flex-direction: column;
        }

        .container {
   
            width: 500px;
            margin: 100px;
            position: relative;
        }

        strong {
   
            margin: 45px;
            font-size: 20px;
        }

        .title {
   
            display: flex;
            align-items: center;
            width: 200px;
            background-color: #fff;
        }

        .title li {
   
            margin: 10px;
            flex: 1;
            cursor: pointer;
            user-select: none;
            height: 30px;
            line-height: 30px;
            color: #666;
            margin-bottom: 40px;
            border-bottom: 3px solid #fff;
        }

        .title li:hover {
   
            border-bottom: 3px solid #00A862;
            color: rgba(46, 44, 44, 0.87);
            font-weight: 700;
        }

        .title>li.active {
   
            color: rgb(180, 47, 47);
        }

        .content {
   
            position: absolute;
            top: 0;
            left: 250px;
            background: rgb(245, 245, 245);
            width: 800px;
            height
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值