最简单的让多行表格滚动方法

DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>霞光照明title>
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="description" content="">
    <meta name="Keywords" content="">
    
    <link rel="icon" type="image/x-icon" href="favicon.ico" />
    
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/font-awesome.css">
    
    <link rel="stylesheet" type="text/css" href="css/base.css">
    <link rel="stylesheet" href="css/layui.css">
    <script src="js/jquery.min.js">script>
    <script src="js/popper.min.js">script>
    <script src="js/bootstrap.min.js">script>
    
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js" type=" text/javascript">script>
    <script src="https://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.7.2.js">script>
    <script src="js/base.js">script>
    <link rel="stylesheet" href="css/bootstrap.css">
    
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="css/animate.css">
    <style>
        .table td {
            width: 85px;
            display: inline-block;
            text-align: center;
        }
    style>

head>

<body>
    
    <div class="container" style="width: 900px;">
        <table   class="table">
            <thead>
                <tr class="success">
                    <td class="">aatd>
                    <td>aatd>
                    <td>aatd>
                    <td>aatd>
                    <td>aatd>
                    <td>aatd>
                    <td>aatd>
                    <td>aaqtd>
                    <td>aatd>
                    <td>a1td>
                tr>
            thead>
        table>
    div>
    <div class="container" style="overflow:scroll;height: 300px;width: 900px;">
        <table   class="table">
            <tbody id="p">
            tbody>
        table>
    div>
    <script>
        function addTable() {
            for (var i = 0; i < 500; i++) {
                $("#p").append("");
            }
        }

        function addTable1() {
            for (var i = 0; i < 10; i++) {
                $(".aa").append("q");
            }
        }
        addTable();
        addTable1();
    script>

body>

html>

 

你可能感兴趣的:(最简单的让多行表格滚动方法)