html动态tabs选项卡,jQuery创意Tabs选项卡

本文介绍了一种使用jQuery和Bootstrap实现的创意选项卡特效方法。通过简单的CSS代码即可为原生Bootstrap选项卡添加炫酷的视觉效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

d96d28ebb31bc9bad8882de6686a0920.png

94a6dc5feabd4193c6b752bf51a273a1.png

插件描述:基于jquery和bootstrap实现的创意Tabs选项卡特效。通过简单的十几行CSS代码,将原生的bootstrap选项卡进行美化,效果非常炫酷。

使用方法

在页面中引入jquery和bootstrap相关文件。

HTML结构

该tabs选项卡的基本HTML结构如下::

  • Section 1
  • Section 2
  • Section 3

Section 1

.......

Section 2

......

Section 3

.......

tabs选项卡美化效果

CSS样式

然后通过下面的CSS代码来对tabs选项卡进行美化。a:hover,a:focus{

text-decoration: none;

outline: none;

}

.tab .nav-tabs{

border: none;

border-bottom: 2px solid #079fc9;

margin: 0;

}

.tab .nav-tabs li a{

padding: 10px 20px;

margin: 0 10px -1px 0;

font-size: 17px;

font-weight: 600;

color: #293241;

text-transform: uppercase;

border: 2px solid #e6e5e1;

border-bottom: none;

border-radius: 5px 5px 0 0;

z-index: 1;

position: relative;

transition: all 0.3s ease 0s;

}

.tab .nav-tabs li a:hover,

.tab .nav-tabs li.active a{

background: #fff;

color: #079fc9;

border: 2px solid #079fc9;

border-bottom-color: transparent;

}

.tab .nav-tabs li a:before{

content: "";

display: block;

height: 2px;

background: #fff;

position: absolute;

bottom: -2px;

left: 0;

right: 0;

transform: scaleX(0);

transition: all 0.3s ease-in-out 0s;

}

.tab .nav-tabs li.active a:before,

.tab .nav-tabs li a:hover:before{ transform: scaleX(1); }

.tab .tab-content{

padding: 10px;

font-size: 17px;

color: #6f6f6f;

line-height: 30px;

letter-spacing: 1px;

position: relative;

}

@media only screen and (max-width: 479px){

.tab .nav-tabs{ border: none; }

.tab .nav-tabs li{

width: 100%;

text-align: center;

margin-bottom: 15px;

}

.tab .nav-tabs li a{

margin: 0;

border-bottom: 2px solid transparent;

}

.tab .nav-tabs li a:before{

content: "";

width: 100%;

height: 2px;

background: #079fc9;

position: absolute;

bottom: -2px;

left: 0;

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值