国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > WEB開發(fā) > 正文

簡單實(shí)用的網(wǎng)頁表格特效

2024-04-27 13:54:50
字體:
供稿:網(wǎng)友
在我們制作主頁的過程中,用到表格的地方非常多,靈活運(yùn)用表格技巧可以為我們的網(wǎng)頁增色不少,這里我就詳細(xì)介紹幾中特效表格的制作方法。

  一、彩色虛線表格

<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ù)表格對齊的方式
  這里主要是將第一個(gè)表格居左,第二個(gè)表格居右,第三個(gè)表格居中。這樣當(dāng)你隨意調(diào)整里面三個(gè)表格大小的時(shí)候,他們的間距將保持不變,非常方便。

<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);
}
-->
<table width="200" border="0" cellpadding="0" cellspacing="0" class="bg">
<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>

  六、陰影表格

  這里主要用到了CSS濾鏡style="filter:shadow(color=#cccccc,direction=120);width:300;padding-right:10;padding-bottom:10"
<div style="filter:shadow(color=#cccccc,direction=120);width:300;padding-right:10;padding-bottom:10">
<table width=300 border=1 bgcolor=#EAEAEA>
<tr><td width="93">111</td><td width="91">222</td><td width="94">333</td></tr>
</table>
</div>

  附:插入CSS樣式的方法(我們這里用半透明表格來做說明)
  第一種方法是定義一個(gè)CSS名稱。
  比如
<style type="text/css">
<!--
.bg {
background-color: #66CCFF;
filter: Alpha(Opacity=20);
}
-->
  元素需要用到CSS的時(shí)候,比如表格,定義一個(gè)CLASS就可以了,如
<table width="200" border="0" cellpadding="0" cellspacing="0" class="bg">
  第二種是直接在你需要用到CSS元素的地方插入相關(guān)代碼,style=""如:
<table width="201" border="1" style="filter: Alpha(Opacity=20);background-color: #66CCFF;">

上一篇:理解表現(xiàn)和結(jié)構(gòu)相分離

下一篇:解析HTML的增強(qiáng)標(biāo)記

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
學(xué)習(xí)交流
熱門圖片

新聞熱點(diǎn)

疑難解答

圖片精選

網(wǎng)友關(guān)注

主站蜘蛛池模板: 吴川市| 山丹县| 林州市| 晋州市| 肃南| 山东省| 雷波县| 韶关市| 股票| 恭城| 双辽市| 安庆市| 陈巴尔虎旗| 得荣县| 津市市| 黄龙县| 长葛市| 临汾市| 临潭县| 靖安县| 墨玉县| 高邮市| 台江县| 鲁甸县| 南投县| 泰宁县| 辉县市| 蓬莱市| 和林格尔县| 上林县| 宁化县| 永年县| 乌海市| 阿克陶县| 连州市| 白山市| 浮梁县| 大足县| 沁源县| 乌兰浩特市| 曲靖市|