zoukankan      html  css  js  c++  java
  • css定义表格边框和表头

    < html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>一个css类封装的细线表格边框</title>
    <style type="text/css">
    <!--
    .mytable {
    border-collapse : collapse;
    }
    .mytable td {
            background-color: #CCFFff;
            border: 1px solid #ff9900;
    }
    .mytable th
    {background-color: #CCFFcc;
     border: 1px solid #ff9900;
    }

    .tdwidth{30px;}  --控制列的宽度,只需要写在一个td中就可以控制整个列的宽度
    -->
    </style>
    </head>

    <body>
    <table width="300" border="0" cellpadding="0" cellspacing="0" class="mytable" >
    <thead >
    <tr>
     <th class="tdwidth">&nbsp;</th>
        <th>&nbsp;</th>
        <th>&nbsp;</th>
        <th>&nbsp;</th>
        <th>&nbsp;</th>
    </tr>
    </thead >
      <tr >
        <td >&nbsp;</td>
        <td>&nbsp;</td>
        <td class="tdwidth">只需要写在一个td中就可以控制整个列的宽度</td>
        <td >&nbsp;</td>
        <td >&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
    </body>
    < /html >

  • 相关阅读:
    RabbitMQ安装与配置
    在Web项目中使用shiro
    solr整合spring
    mycat
    SpringSession管理
    Nginx安装与配置(Nginx服务器和Tomcat服务器是不同的服务器)
    dubbo负载均衡与服务降级以及Zookeeper认证
    小笔记
    SpringMVC路径转发与重定向
    java-同步控制及不可变设置(只读访问)
  • 原文地址:https://www.cnblogs.com/chenyuwang2009/p/2723931.html
Copyright © 2011-2022 走看看