zoukankan      html  css  js  c++  java
  • 分享一个不错的表格样式

    先贴个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;
    }

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

  • 相关阅读:
    spoj705
    bzoj2440
    spoj220
    bzoj2301
    hdu1695
    poj3294
    hdu3518
    poj3693
    函数
    样式
  • 原文地址:https://www.cnblogs.com/seasons1987/p/2573278.html
Copyright © 2011-2022 走看看