表格高級(jí)使用技巧_把表格進(jìn)行到底(必看)
更新時(shí)間:2008年05月04日 19:47:57 作者:
很早以前的關(guān)于表格的高級(jí)使用技巧,建議學(xué)習(xí),并不是一定都要用div+css布局的,很適合現(xiàn)在
1.表格的分隔線(xiàn)可以隱藏
<table border rules=cols cellspacing=0 align=left> 可以隱藏橫向的分隔線(xiàn)
<table border rules=rows cellspacing=0 align=right>可以隱藏縱向的分隔線(xiàn)
<table border rules=none cellspacing=0 align=center>可以隱藏橫向和縱向的分隔線(xiàn)
2.表格的邊框不斷在閃
以下方法可以令表格的邊框不斷在閃,很實(shí)用的
在BODY區(qū)加上
<table border="0" width="280" id="myexample"
style="border:5px solid yellow">
<tr>
<td>加入任意的物件.加入任意的物件.
<br>加入任意的物件.加入任意的物件.
<br>加入任意的物件.加入任意的物件.</td>
</tr>
</table>
<script language="JavaScript1.2">
<!--
function flashit(){
if (!document.all)
return
if (myexample.style.borderColor=="yellow")
myexample.style.borderColor="lime"
else
myexample.style.borderColor="yellow"
}
setInterval("flashit()", 500)
//-->
</script>
3.表格分行下載
這個(gè)對(duì)表哥內(nèi)容很大比較實(shí)用
在需要分行下載處加上 <tbody >
比如:
<table >
<tbody >
<tr >
<td >flsdjfsdjfkdsjf</td >
</tr >
<tr >
<td >skdjfsdjfksd</td >
</tr >
</tbody >
<tbody >
<tr >
<td >flsdjfsdjfkdsjf</td >
</tr >
<tr >
<td>skdjfsdjfksd</td >
</tr >
</tbody >
</table >
4.幾種樣式不同的表格
<table border="1" width="220" style="position: absolute; left:
11; top: 11" height="26" >
<tr>
<td width="100%">普通表格</td>
</tr>
</table>
5.正立方表格
<table border="1" width="220" bordercolorlight="#eeeeee"
bordercolordark="#000000" style="position: absolute; left: 10; top:
49" height="26">
<tr>
<td width="100%">正立方表格</td>
</tr>
</table>
6.細(xì)表格
<table border="0" frame=vsides width="219"
bgcolor="#000000" cellspacing="1" cellpadding="0"
height="22" style="position: absolute; left: 11; top: 86">
<tr bgcolor="#FFFFFF">
<td width="100%" height="2">細(xì)表格</td>
</tr>
</table>
7.立體表格
<table border="1" width="220" bordercolorlight="#ffffff"
bordercolordark="#ffffff" style="position: absolute; left: 10; top:
112" height="34">
<tr>
<td width="100%" bgcolor="#B7B7B7"
bordercolorlight="#000000" bordercolordark="#eeeeee" >立體表格</td>
</tr>
</table>
8.無(wú)名表格
<table width="220" align="center" style="position: absolute;
left: 246; top: 12" height="51">
<tr>
<td><fieldset style="width:220" align="center">
<legend> 無(wú)名表格 </legend> <p align="right"> </fieldset>
<br>
</td>
</tr>
</table>
9.表中表效果Ⅱ
<table width="220" align="center" style="position:
absolute; left: 245; top: 89" height="110">
<tr>
<td height="75"><fieldset style="width:220"
align="center"> <legend> 表中表效果Ⅱ </legend> <table
frame="hsides" border="1"
bordercolorlight="#000000" bordercolordark="#ffffff"
width="100%" cellspacing="1" cellpadding="0" height="78">
<tr bgcolor="#ffffff">
<td width="100%" height="76"></fieldset></td>
</tr>
</table>
10.表中表效果Ⅰ
<table width="220" align="center" style="position: absolute;
left: 10; top: 120" height="138" cellspacing="1"
cellpadding="0">
<tr>
<td height="126"><fieldset style="width: 220; color: #B7B7B7;
border-style: groove" align="center"> <legend style="color:
#FFFFFF; border: 1 solid #808080" > <font color="#000000">表中表效果Ⅰ</font>
</legend> <p align="right"> </fieldset>
</td>
</tr>
</table>
11.表格中邊框的顯示
只顯示上邊框 <table frame=above>
只顯示下邊框 <table frame=below>
只顯示左、右邊框 <table frame=vsides>
只顯示上、下邊框 <table frame=hsides>
只顯示左邊框 <table frame=lhs>
只顯示右邊框 <table frame=rhs>
不顯示任何邊框 <table frame=void>
<table border rules=cols cellspacing=0 align=left> 可以隱藏橫向的分隔線(xiàn)
<table border rules=rows cellspacing=0 align=right>可以隱藏縱向的分隔線(xiàn)
<table border rules=none cellspacing=0 align=center>可以隱藏橫向和縱向的分隔線(xiàn)
2.表格的邊框不斷在閃
以下方法可以令表格的邊框不斷在閃,很實(shí)用的
在BODY區(qū)加上
<table border="0" width="280" id="myexample"
style="border:5px solid yellow">
<tr>
<td>加入任意的物件.加入任意的物件.
<br>加入任意的物件.加入任意的物件.
<br>加入任意的物件.加入任意的物件.</td>
</tr>
</table>
<script language="JavaScript1.2">
<!--
function flashit(){
if (!document.all)
return
if (myexample.style.borderColor=="yellow")
myexample.style.borderColor="lime"
else
myexample.style.borderColor="yellow"
}
setInterval("flashit()", 500)
//-->
</script>
3.表格分行下載
這個(gè)對(duì)表哥內(nèi)容很大比較實(shí)用
在需要分行下載處加上 <tbody >
比如:
<table >
<tbody >
<tr >
<td >flsdjfsdjfkdsjf</td >
</tr >
<tr >
<td >skdjfsdjfksd</td >
</tr >
</tbody >
<tbody >
<tr >
<td >flsdjfsdjfkdsjf</td >
</tr >
<tr >
<td>skdjfsdjfksd</td >
</tr >
</tbody >
</table >
4.幾種樣式不同的表格
<table border="1" width="220" style="position: absolute; left:
11; top: 11" height="26" >
<tr>
<td width="100%">普通表格</td>
</tr>
</table>
5.正立方表格
<table border="1" width="220" bordercolorlight="#eeeeee"
bordercolordark="#000000" style="position: absolute; left: 10; top:
49" height="26">
<tr>
<td width="100%">正立方表格</td>
</tr>
</table>
6.細(xì)表格
<table border="0" frame=vsides width="219"
bgcolor="#000000" cellspacing="1" cellpadding="0"
height="22" style="position: absolute; left: 11; top: 86">
<tr bgcolor="#FFFFFF">
<td width="100%" height="2">細(xì)表格</td>
</tr>
</table>
7.立體表格
<table border="1" width="220" bordercolorlight="#ffffff"
bordercolordark="#ffffff" style="position: absolute; left: 10; top:
112" height="34">
<tr>
<td width="100%" bgcolor="#B7B7B7"
bordercolorlight="#000000" bordercolordark="#eeeeee" >立體表格</td>
</tr>
</table>
8.無(wú)名表格
<table width="220" align="center" style="position: absolute;
left: 246; top: 12" height="51">
<tr>
<td><fieldset style="width:220" align="center">
<legend> 無(wú)名表格 </legend> <p align="right"> </fieldset>
<br>
</td>
</tr>
</table>
9.表中表效果Ⅱ
<table width="220" align="center" style="position:
absolute; left: 245; top: 89" height="110">
<tr>
<td height="75"><fieldset style="width:220"
align="center"> <legend> 表中表效果Ⅱ </legend> <table
frame="hsides" border="1"
bordercolorlight="#000000" bordercolordark="#ffffff"
width="100%" cellspacing="1" cellpadding="0" height="78">
<tr bgcolor="#ffffff">
<td width="100%" height="76"></fieldset></td>
</tr>
</table>
10.表中表效果Ⅰ
<table width="220" align="center" style="position: absolute;
left: 10; top: 120" height="138" cellspacing="1"
cellpadding="0">
<tr>
<td height="126"><fieldset style="width: 220; color: #B7B7B7;
border-style: groove" align="center"> <legend style="color:
#FFFFFF; border: 1 solid #808080" > <font color="#000000">表中表效果Ⅰ</font>
</legend> <p align="right"> </fieldset>
</td>
</tr>
</table>
11.表格中邊框的顯示
只顯示上邊框 <table frame=above>
只顯示下邊框 <table frame=below>
只顯示左、右邊框 <table frame=vsides>
只顯示上、下邊框 <table frame=hsides>
只顯示左邊框 <table frame=lhs>
只顯示右邊框 <table frame=rhs>
不顯示任何邊框 <table frame=void>
相關(guān)文章
使用display:none時(shí)隱藏DOM元素?zé)o法獲取實(shí)際寬高的解決方法
這篇文章主要介紹了使用display:none時(shí)隱藏DOM元素?zé)o法獲取實(shí)際寬高的解決方法的相關(guān)資料,需要的朋友可以參考下2022-07-07
[轉(zhuǎn)]目前找到的最好的Iframe自適應(yīng)高度代碼
[轉(zhuǎn)]目前找到的最好的Iframe自適應(yīng)高度代碼...2007-02-02
布局用CSS+DIV的優(yōu)點(diǎn)總結(jié)
布局用CSS+DIV的優(yōu)點(diǎn)總結(jié)...2007-08-08
flash幻燈片需要先激活A(yù)ctiveX控件才能使用的又一個(gè)辦法
flash幻燈片需要先激活A(yù)ctiveX控件才能使用的又一個(gè)辦法...2007-11-11
20個(gè)優(yōu)秀CSS網(wǎng)站(3月精選)
20個(gè)優(yōu)秀CSS網(wǎng)站(3月精選)...2007-03-03
解決ie動(dòng)態(tài)修改link樣式,import css不刷新的問(wèn)題
當(dāng)我們需要?jiǎng)討B(tài)更新link的樣式的時(shí)候,通常是直接修改link的 href 屬性。但是如果樣式里有import的樣式表,IE就不會(huì)在發(fā)起請(qǐng)求去刷新了(其他瀏覽器都是正常的)2008-05-05
relative absolute無(wú)法沖破的等級(jí)問(wèn)題解決
如果我我們?cè)O(shè)定LI為position:relative;設(shè)置span為position:absolute;那么我們會(huì)發(fā)現(xiàn)無(wú)論SPAN的z-index值設(shè)置得再高都將永遠(yuǎn)在后面父級(jí)的下面。2008-06-06

