1 回答
TA贡献1963条经验 获得超6个赞
这段代码将解决您的问题。
.nav-item {
color: black;
background-color: white;
text-decoration:none;
font-weight: bold;
}
a.nav-item.nav-link.active {
color: white;
background-color: #f90;
text-decoration:none;
font-weight: bold;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<nav class="nav nav-pills nav-justified" role="tablist">
<a class="nav-item nav-link active" id="nav-proxims-tab" data-toggle="tab" href="#nav-proxims" role="tab" aria-controls="nav-proxims" aria-selected="true">Pròxims</a>
<a class="nav-item nav-link" id="nav-historic-tab" data-toggle="tab" href="#nav-historic" role="tab" aria-controls="nav-historic" aria-selected="false">Històric</a>
</nav>
</div>
</body>
</html>
- 1 回答
- 0 关注
- 69 浏览
添加回答
举报