<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="lib/css/bootstrap.css">
<script src="lib/js/bootstrap.js"></script>
<script src="lib/js/jquery.min.js"></script>
<script src="lib/jquery.js"></script>
<style>
table tr td{
/*border: 1px solid red;*/
text-align: center;
vertical-align: center;
}
.table{
width:100%;
max-width: 100%;
}
tbody{
overflow-y:scroll;
}
.thead{
padding-top: 2px;
padding-bottom: 2px;
}
.table>thead>tr{
background: #fff;
padding: 3px 8px;
height: 50px;
line-height: 50px;
}
.thead>tr>td{
font-size: 1.5rem;
color: #333;
border-right: 1px solid grey;
}
.table>tbody>tr:nth-child(odd){
background: aliceblue;
}
表格滚动,表头不滚动,表数据内容滚动
最新推荐文章于 2024-05-30 16:32:52 发布