June 1 2007

学习Table 中thead tbody tfoot 的使用

Filed under: xhtml/css - ferry @ 20:14 pm

考虑了好久,没想到比较满意的实现办法,发到BI上看看高人们有没有更好的方法,果然不虚此行,很快就看到了Purecss的制作方法,原来还有这样的一个Table可以用,学习一下.

Title of the table
content content content content
content content content content
content content content content

<table>
 <caption>Title of the table</caption>
 <thead>
  <tr>
   <td>content</td>
   <td>content</td>
   <td>content</td>
   <td>content</td>
  </tr>
 <thead>
 <tbody>
  <tr>
   <td>content</td>
   <td>content</td>
   <td>content</td>
   <td>content</td>
  </tr>
 </tbody>
 <tfoot>
  <tr>
   <td>content</td>
   <td>content</td>
   <td>content</td>
   <td>content</td>
  </tr>
 </tfoot>
</table>

当<thead>中<td>换为<th>时第一行字体将加粗,即为表格内容每列的标题;
当<thead>,<tbody>,<tfoot>中第一个<td>换为<th>时第一行字体将加粗,即为表格内容每行的标题;
根据需要,分别定义CSS就可以实现多种效果了。emoticon

Comments »

The URI to TrackBack this entry is: http://ferrychu.blogsome.com/2007/06/01/23/trackback/

No comments yet.

RSS feed for comments on this post.

Write here

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome
Theme designed by Ferry Chu
Website Hit Tracking
Copyright © 2007 Chuyujiang