<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
ul {
list-style: none;
}
a {
color: #1b1b1b;
text-decoration: none;
}
a:hover {
color: #f00;
}
.fl {
float: left;
}
.fr {
float: right;
}
.container {
width: 1000px;
margin: 10px auto;
}
.tab-box{
width: 495px;
height:100%;
border: 1px solid #ccc;
}
.menu {
display: flex;
justify-content: space-between;
height:40px;
width: 100%;
border-bottom: 1px solid #ccc;
}
.menu .more{
flex: 0 0 50px;
line-height: 40px;
text-align: center;
}
.menu .more a {
display: none;
}
.menu ul {
display:flex;
flex: 1;
height: 100%;
}
.menu ul li {
flex: 0 0 80px;
line-height: 40px;
text-align: center;
}
.current {
color: #fff;
background-color: #4e6ef2;
}
.content {
padding: 10px;
}
.show {
display: block !important;
}
.hidden {
display: none !important;
}
.content li{
line-height: 30px;
width:475px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.content ul {
display: none;
}
.current a{
color: #fff
}
</style>
</head>
<body>
带 more 按钮的 tab 切换
最新推荐文章于 2023-04-02 14:20:18 发布