php168讨论区论坛 » PHP168整站使用求助、BUG反馈、经验交流区 » 常见特殊表格代码--你绝对用的到
PHP168专用空间1G 150元/年 送域名和数据库 1.2G全能空间送200M数据库 仅售99元 1G双线双IP高速空间+200M数据库=158

1G双线空间+CN+SQL=99 免费代办备案

PHP168官方推荐虚机—阳光互联 上海电信DELL双志强598/月4G硬防10M带宽 域名1元/年 至强空间80/年 整机起售450/月 托管300/月

广告位招租,联系QQ:81684210

网拓1G双线空间送数据库+邮局=88元/年


本页主题: 常见特殊表格代码--你绝对用的到 打印 | 加为IE收藏 | 收藏主题 | 上一主题 | 下一主题

chenlei8869 该用户目前不在线

级别: 本科生
发帖: 360
积分: 2742 点
铜板: 79 个
注册时间:2007-02-06
最后登录:2008-11-17

常见特殊表格代码--你绝对用的到

本帖被 lisheng51 执行加亮操作(2008-06-06)
1.表格的分隔线可以隐藏

<table border rules=cols cellspacing=0 align=left> 可以隐藏横向的分隔线

<table border rules=rows cellspacing=0 align=right>可以隐藏纵向的分隔线

<table border rules=none cellspacing=0 align=center>可以隐藏横向和纵向的分隔线


2.表格的边框不断在闪

以下方法可以令表格的边框不断在闪,很实用的
在BODY区加上

<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.表格分行下载

这个对表哥内容很大比较实用

在需要分行下载处加上 <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.细表格

<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">细表格</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.无名表格 

<table width="220" align="center" style="position: absolute;
left: 246; top: 12" height="51">

<tr>

<td><fieldset style="width:220" align="center">
<legend> 无名表格 </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>



12。用不同颜色显示表格奇偶行

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>双色表格CSS实例</title>
<style type="text/css">
.test {
  background-color:red;
}
#DataGrid1 tr {
    background-color: expression(
        this.sectionRowIndex == 0 ? "#FFCCCC" :
        (
            (this.sectionRowIndex % 2 == 0) ? "#FFF0F0" : "#F0F0FF"
        )
    );
    color: expression(this.sectionRowIndex == 0 ? "#FFFFFF" : "");
    font-weight: expression(this.sectionRowIndex == 0 ? "BOLD" : "");
    RowSelect: expression(0==1?"":(
  onclick = function()
            {
                  window.currentRow?window.currentRow.style.backgroundColor=(
                    this.style.backgroundColor != "#69cdff" ? "#69cdff" :
                    (
                        this.sectionRowIndex == 0 ? "#FFCCCC" :
                        (
                            this.sectionRowIndex % 2 == 0 ? "#FFF0F0" : "#F0F0FF"
                        )
                    )
                ):"";
              this.style.backgroundColor="#f3c3f3";
              window.currentRow=this;
                window.stopOut=true;
            }
)
);
    TableSelect: expression(
        this.sectionRowIndex == 0 ? "" :
        (
            onmouseover = function()
            {
  window.stopOut=false;
                this.style.backgroundColor =
                (
                    this.style.backgroundColor != "#69cdff" ? "#69cdff" :
                    (
  @





13。透明表格

<table bgcolor=#ececec style="filter:alpha(opacity=50)" width=200 height=100 border=0>
  <tr><td><center>cnbruce</td></tr>
</table>


14.表格边框显示外阴影

<table  align=center  width=200  height=100  bgcolor=#f3f3f3
style="filter:progid:DXImageTransform.Microsoft.Shadow
(Color=#333333,Direction=120,strength=5)">
  <tr>
    <td><center>www.cnbruce.com</td>
  </tr>
</table>


15。VML代码实现的圆角表格

(1).


  源码如下:

<html xmlns:v>
<style>
v:*{behavior:url(#default#VML)}
</style>
<body>
  <v:RoundRect style="position:relative;width:150;height:240px">
    <v:shadow on="T" type="single" color="#b3b3b3" offset="3px,3px"/>
    <v:TextBox style="font-size:10.2pt;">VML</v:TextBox>
    </v:RoundRect>
</body>
</html>

(2).
  源码如下:

<html  xmlns:v>
<style>
v:*{behavior:url(#default#VML)}
</style>
<body>
      <v:RoundRect  style="position:relative;width:150;height:240px">
<v:path  textpathok="true"  />
      <v:textpath  on="true"  string="cnbrucecnbrucecnbrucecnbrucecnbruc
ecnbrucecnbrucecnbrucecnbrucecnbrucecnbrucecnbrucecnbrucecnbrucecnbruce"  />
        <v:shadow  on="T"  type="single"  color="#b3b3b3"  offset="3px,3px"/>
        <v:TextBox  style="font-size:10.2pt;">VML</v:TextBox>
        </v:RoundRect> 
</body>
</html>

(3).


  源码如下:

<html xmlns:v>
<style>
v:*{behavior:url(#default#VML)}
</style>
<body>
  <v:RoundRect style="position:relative;width:150;height:240px" arcsize=0.5>
    <v:shadow on="T" type="single" color="#b3b3b3" offset="3px,3px"/>
    <v:TextBox style="font-size:10.2pt;">VML</v:TextBox>
    </v:RoundRect>
</body>
</html>


[ 此贴被chenlei8869在2008-01-25 10:59重新编辑 ]
本帖最近评分记录:
  • 积分:+7(lisheng51) 优秀文章
  • www.51yika.com www.12j12.com官方示范站
    模板制作,网站扩展,QQ:15394391电话13295515005
    顶端 Posted: 2008-01-25 10:34 | [楼 主]
    168靓靓 该用户目前不在线



    级别: 大专生
    发帖: 1082
    积分: 1332 点
    铜板: 67 个
    注册时间:2007-09-01
    最后登录:2008-05-28

    谢谢,楼主的方法很实用
    顶端 Posted: 2008-01-25 11:09 | 1 楼
    yttzm 该用户目前不在线
    荣誉市民奖 近期活跃奖
    头衔:劳动者,最光荣! 劳动者,最光荣!

    1星级VIP用户
    授权用户
    级别: 博士后
    发帖: 3128
    积分: 26198 点
    铜板: 496 个
    注册时间:2006-08-25
    最后登录:2008-11-19

    不错,顶一下。
    顶端 Posted: 2008-01-25 12:05 | 2 楼
    yezi200 该用户目前不在线
    荣誉市民奖
    级别: 硕士
    发帖: 2452
    积分: 5693 点
    铜板: 103 个
    注册时间:2006-05-17
    最后登录:2008-11-19

    对完善网站的美观细节很有用,谢谢楼主
    *****************************************
    *      签名档欠费,点击续费!        *
    *****************************************
    顶端 Posted: 2008-01-25 13:35 | 3 楼
    yms8303 该用户目前不在线

    级别: 初中生
    发帖: 317
    积分: 405 点
    铜板: 23 个
    注册时间:2007-08-02
    最后登录:2008-11-18

    *****************************************
    *      签名档欠费,点击续费!        *
    *****************************************
    顶端 Posted: 2008-01-25 13:38 | 4 楼
    飞鸿踏雪 该用户目前在线
    荣誉市民奖 灌水天才奖 五一雷锋奖 宣传贡献奖 优秀斑竹奖
    头衔:仁者无敌-感恩php168 仁者无敌-感恩php168
    授权用户
    级别: 总版主
    发帖: 9127
    积分: 20463 点
    铜板: 1446 个
    注册时间:2007-09-28
    最后登录:2008-11-20

    很好的代码,谢谢楼主提供~

    飞蓬欲卷世时寒  鸿鹄凌云志比天
      踏破尘路闲入梦  雪霁方晴作笑谈


    如果有会员朋友帮助了您解决了问题,别忘了推荐给我们以表感谢,点击进入推荐贴……
    顶端 Posted: 2008-01-25 13:39 | 5 楼
    wentian525 该用户目前不在线

    级别: 初中生
    发帖: 258
    积分: 371 点
    铜板: 0 个
    注册时间:2007-11-08
    最后登录:2008-11-14

    楼主是个好同志
    顶端 Posted: 2008-01-25 14:11 | 6 楼
    lisheng51 该用户目前不在线
    优秀斑竹奖 荣誉市民奖 终身荣誉奖 五一雷锋奖
    级别: 总版主
    发帖: 19058
    积分: 8742 点
    铜板: 285 个
    注册时间:2006-11-16
    最后登录:2008-11-20

    不错的帖子
    顶端 Posted: 2008-01-25 18:42 | 7 楼
    php168讨论区论坛 » PHP168整站使用求助、BUG反馈、经验交流区
    以铜板换广告位一 以铜板换广告位二 以铜板换广告位三 以铜板换广告位四
    以铜板换广告位五 以铜板换广告位六 以铜板换广告位七 以铜板换广告位八

    Total 0.118172(s) query 4, Time now is:11-20 07:44, Gzip disabled
    Powered by PHPWind v5.3 Certificate Code © 2003-07 PHPWind.com Corporation 京ICP备05047353号