簡單實用的網(wǎng)頁表格特效_Dreamweaver教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!

      一、彩色虛線表格

      虛 線
      表 格

      <style type="text/css">
      <!--
      .tab1 {
      border-top-width: thin;
      border-right-width: thin;
      border-bottom-width: thin;
      border-left-width: thin;
      border-top-style: dotted;
      border-right-style: dotted;
      border-bottom-style: dotted;
      border-left-style: dotted;
      border-top-color: #00CC66;
      border-right-color: #0099CC;
      border-bottom-color: #FF0000;
      border-left-color: #6699FF;
      }
      -->
      </style>
      <table width="200" border="0" cellpadding="2" cellspacing="2" class="tab1">
      <tr>
      <td><div align="center">虛</div></td>
      <td><div align="center">線</div></td>
      </tr>
      <tr>
      <td><div align="center">表</div></td>
      <td><div align="center">格</div></td>
      </tr>
      </table>

      二、鼠標(biāo)指向單元格變色
      onmouseout="this.style.backgroundColor=’’" 鼠標(biāo)離開效果onmouseover="this.style.backgroundColor=’#FFcccc’"鼠標(biāo)放上去的效果,
      可以修改#FFcccc的值來改變顏色

      <table width="200" border="1" cellspacing="0" cellpadding="0">
      <tr>
      <td onmouseout="this.style.backgroundColor=’’" onmouseover="this.style.backgroundColor=’#FFcccc’"> </td>
      </tr>
      <tr>
      <td onmouseout="this.style.backgroundColor=’’" onmouseover="this.style.backgroundColor=’#FFccaa’"> </td>
      </tr>
      </table>
      三、立體表格
      立體 表格

      <table border="1" bordercolorlight="#ffffff" bordercolordark="#ffffff" width="200" cellpadding="0" cellspacing="0">
      <tr align="center">
      <td width="86"
      bordercolorlight="#000000" bordercolordark="#eeeeee" bgcolor="#B7B7B7" >立體</td>
      <td width="108"
      bordercolorlight="#000000" bordercolordark="#eeeeee" bgcolor="#B7B7B7" >表格</td>
      </tr>
      </table>

      四、表格嵌套

      1、利用表格的間距來做嵌套

      <table width="200" border="1" cellspacing="4" cellpadding="0">
      <tr>
      <td> </td>
      <td> </td>
      <td> </td>
      </tr>
      </table>
      主要是用到間距 cellspacing="4"

      2、充分利用根據(jù)表格對齊的方式

        這里主要是將第一個表格居左,第二個表格居右,第三個表格居中。這樣當(dāng)你隨意調(diào)整里面三個表格大小的時候,他們的間距將保持不變,非常方便。

      <table width="200" border="1" cellpadding="0" cellspacing="0" bordercolor="#FF0000">
      <tr>
      <td><table width="60" border="1" align="left" cellpadding="0" cellspacing="0">
      <tr>
      <td> </td>
      </tr>
      </table>
      <table width="60" border="1" align="right" cellpadding="0" cellspacing="0">
      <tr>
      <td> </td>
      </tr>
      </table>
      <table width="80" border="1" align="center" cellpadding="0" cellspacing="0">
      <tr>
      <td> </td>
      </tr>
      </table></td>
      </tr>
      </table>
      五、半透明表格

      半 透明
      表 格

        這里主要是用到了CSS濾鏡filter: Alpha(Opacity=20)。

      <style type="text/css">
      <!--
      .bg {
      background-color: #66CCFF;
      filter: Alpha(Opacity=20);

      共2頁上一頁12下一頁
      來源:天極網(wǎng)//所屬分類:Dreamweaver教程/更新時間:2006-04-01
      相關(guān)Dreamweaver教程