<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>选项卡</title>
<style type="text/css">
.box{
width: 300px;
height: 300px;
border: 1px solid #eee;
margin: 50px auto;
}
.box .top{
width: 300px;
height: 40px;
overflow: hidden;
}
.box .top span{
float: left;
width: 99px;
height: 39px;
border-left: 1px solid #eee;
border-bottom: 1px solid #eee;
font-size: 16px;
line-height: 39px;
text-align: center;
color: #333;
}
.box .top .first{
border-left: none;
width: 100px;
}
.box .top .cur{
border-bottom: none;
font-weight: bold;
}
.box .bottom{
width: 300px;
height: 260px;
overflow: hidden;
}
.box .bottom div{
width: 100%;
height: 260px;
}
</style>
</head>
<body>
<div class="box">
<div class="top">
<span class="first">新闻</span>
<span class="cur">体育</span>
<span>时尚</span>
</div>
<div class="bottom">
<div class="">新闻</div>
<div class="">体育</div>
<div class="">时尚</div>
</div>
</div>
</body>
</html>
选项卡基础布局
最新推荐文章于 2023-02-19 01:35:44 发布