可隐藏选项卡html,隐藏HTML中选定选项卡的底部边框

我有一个水平HTML选项卡,其中我希望隐藏所选选项卡的底部边框。隐藏HTML中选定选项卡的底部边框

这个问题已经被问here和here

但这两种解决方案都不能正常工作,因为我使用一个div结构,没有太大的JavaScript。

jQuery('.tab-links a').on('click', function(e) {

var currentAttrValue = jQuery(this).attr('href');

jQuery(currentAttrValue).show().siblings().hide(); //changed here

jQuery(this).parent('li').addClass('active').siblings().removeClass('active');

e.preventDefault();

});

.tabs {

width: 90%;

margin: auto;

}

/*----- Tab Links -----*/

/* Clearfix */

.tab-links:after {

display: block;

clear: both;

content: '';

}

.tab-links {

margin: 0px;

}

.tab-links li {

margin: 0px 3px;

float: left;

list-style: none;

}

.tab-links a {

padding: 9px 15px;

display: inline-block;

border-radius: 3px 3px 0px 0px;

text-decoration: none;

font-size: 16px;

font-weight: 600;

color: #999;

transition: all linear 0.2s;

border: 1px solid #fff;

}

.tab-links a:hover {

text-decoration: none;

/*background: #f1f1f1;*/

/*border-bottom: 4px solid #999; */

}

li.active a,

li.active a:hover {

/* border-bottom: 4px solid #444; */

/*background: #ccc;*/

border: 1px solid #ccc;

border-bottom: 1px solid #fff;

color: #444;

}

/*----- Content of Tabs -----*/

.tab-content {

padding: 15px;

border-radius: 3px;

border: 1px solid #ccc;

background: #fff;

min-height: 300px;

z-index: -99;

}

.tab {

display: none;

min-height: 300px;

}

.tab.active {

display: block;

}

Videos and Screenshots

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值