樣式 css HTML 常用總結

來源:互聯網
上載者:User
文章目錄
  • <th align=#> #=left, center, right 表格內文字的對齊/布局
  • border 表格尺寸設定
  • <table border cellspacing=#>
  • <table border cellpadding=#>
 nowrap  控制不換行
 .over_hidden{white-space:nowrap;overflow: hidden;width:100%;text-overflow: ellipsis;} 超過制定長度使用三個點替換
colspan  跨越多列
rowspan  跨越多行


<table border cellspacing=10>   表元間隙設定:

<table border cellpadding=#>

表元內部空白設定:

<th align=#> #=left, center, right 表格內文字的對齊/布局



border 表格尺寸設定

例子:
<table border>
<tr><th colspan=3> Morning Menu</th>
<tr><th>Food</th> <th>Drink</th> <th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>

<table border>
<tr><th rowspan=3> Morning Menu</th>
<th>Food</th> <td>A</td></tr>
<tr><th>Drink</th> <td>B</td></tr>
<tr><th>Sweet</th> <td>C</td></tr>
</table>


<table border=10>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>

<table border cellspacing=#>

表元間隙設定:

<table border cellspacing=10>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>

<table border cellpadding=#>

表元內部空白設定:

<table border cellpadding=10>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>


 
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.