以文本方式查看主题

-  课外天地 李树青  (http://njcie.com/bbs/index.asp)
--  Web技术  (http://njcie.com/bbs/list.asp?boardid=28)
----  课上练习代码——样式表格  (http://njcie.com/bbs/dispbbs.asp?boardid=28&id=1492)

--  作者:admin
--  发布时间:2015/4/21 12:14:20
--  课上练习代码——样式表格

<html>
<head>
<style type="text/css">
#customers {
        font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
        width:100%;
        border-collapse:collapse;
}
#customers td, #customers th {
        font-size:1em;
        border:1px solid #98bf21;
        padding:3px 7px 2px 7px;
}
#customers th {
        font-size:1.1em;
        text-align:left;
        padding-top:5px;
        padding-bottom:4px;
        background-color:#A7C942;
        color:#ffffff;
}
#customers tr.alt td {
        color:#000000;
        background-color:#EAF2D3;
}
</style>
</head>
<body>
<table id="customers">
  <tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Apple</td>
    <td>Steven Jobs</td>
    <td>USA</td>
  </tr>
  <tr class="alt">
    <td>Baidu</td>
    <td>Li YanHong</td>
    <td>China</td>
  </tr>
  <tr>
    <td>Google</td>
    <td>Larry Page</td>
    <td>USA</td>
  </tr>
  <tr class="alt">
    <td>Lenovo</td>
    <td>Liu Chuanzhi</td>
    <td>China</td>
  </tr>
  <tr>
    <td>Microsoft</td>
    <td>Bill Gates</td>
    <td>USA</td>
  </tr>
  <tr class="alt">
    <td>Nokia</td>
    <td>Stephen Elop</td>
    <td>Finland</td>
  </tr>
</table>
</body>
</html>

 


图片点击可在新窗口打开查看此主题相关图片如下:无标题.png
图片点击可在新窗口打开查看

[此贴子已经被作者于2016-10-10 16:15:35编辑过]