zoukankan      html  css  js  c++  java
  • 记录:固定table表头不动内容滚动

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >

    <head>

        <title>Untitled Page</title>

    <style>

    .title{width:100%;background:#EFEFEF; border:1px solid gray;}

    .content{width:100%;sborder:1px solid black; border-top:0px; height:300px; overflow-y:scroll; overflow-x:hidden;}

     

    td{background:white; font-size:9pt; color:blue; padding-left:5px;}

     

    </style>

    </head>

    <body>

     

    <div class="title">

    <input type="button" value="TestBtn" style="border:1px solid black;" />

    </div>

    <div class="content">

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    Test<br />

    </div>

        <table border="0" cellpadding="4" cellspacing="1" style="background:black;">

            <tr>

                <td style=" 100px">aaa

                </td>

                <td style=" 100px">fff

                </td>

                <td style=" 100px">bbb

                </td>

            </tr>

            <tr>

                <td style=" 100px">ddd

                </td>

                <td style=" 100px">wefwe

                </td>

                <td style=" 100px">wfwef

                </td>

            </tr>

            <tr>

                <td style=" 100px">wef

                </td>

                <td style=" 100px">wef

                </td>

                <td style=" 100px">wf

                </td>

            </tr>

        </table>

     

     

    </body>

    </html>

  • 相关阅读:
    51nod 1621 花钱买车牌 优先队列
    最大字段和 51nod 1049 水水水水水水水水水水水水
    大数相乘 51nod 1027 水题
    逆序数 51nod 1019 归并 分治
    最长公共子序列 LCS 递归 dp 51Nod 1006
    vc6 字体设置
    自行车维护大全(zz)
    DirectX 9.0 3D游戏开发编程基础 [书评](zz)
    二维线段树
    latex 引用文献 bib
  • 原文地址:https://www.cnblogs.com/LeimOO/p/1522768.html
Copyright © 2011-2022 走看看