• 分享一个不错的表格样式


    先贴个HTML生成的源码出来:

    <!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>一个表格例子</title>
    <style>
    th
    {
        background-image:url(win_top.png);
        height: 26px;
        font-weight:bold;
        color: #FFF;
    }
    </style>
    </head>
    <body>
    <table width="600" border="0" cellpadding="0" cellspacing="1" style="background-color:#D9E6FF;">
      <tr>
        <th width="200" scope="col">Seasons1987</th>
        <th width="200" scope="col">Seasons1987</th>
        <th width="200" scope="col">Seasons1987</th>
      </tr>
      <tr style="background-color:White;height:10px;">
        <td align="center">&nbsp;</td>
        <td align="center">&nbsp;</td>
        <td align="center">&nbsp;</td>
      </tr>
      <tr style="background-color:White;height:10px;">
        <td align="center">&nbsp;</td>
        <td align="center">&nbsp;</td>
        <td align="center">&nbsp;</td>
      </tr>
      <tr style="background-color:White;height:10px;">
        <td align="center">&nbsp;</td>
        <td align="center">&nbsp;</td>
        <td align="center">&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>

    下面是效果图(IE8):

     图一 蓝色+渐变,网上找到的素材

    图片地址:表头背景图片

    最后,顺便说一下在VS 2008中的设置办法,见下图,注意黑色粗体部分,其它的设置可不理:

     图二 GridView的属性设置

     最后,加入如下的样式片断在文档的<style></style>之间或CSS文件中即可!

    th
    {
        background-image:url(../images/win_top.png);
        height: 26px;
        font-weight:bold;
        color: #FFF;
    }

    如果有什么好的样式希望能分享一下咯。

  • 相关阅读:
    检验Excel中数据是否与数据库中数据重复
    C# 上传文件
    asp.net Excel导入和导出
    完整ASP.Net Excel导入
    C#遍历指定文件夹中的所有文件
    C#获取文件夹下的所有文件的文件名
    UITextField 文本框 只能输入数字 且保留2位小数 实现
    Asp.Net生成无限级菜单
    给Repeater增加button事件,并绑定值
    简洁的Asp.net菜单控件
  • 原文地址:https://www.cnblogs.com/seasons1987/p/2573278.html
Copyright © 2020-2023  润新知