易截截图软件、单文件、免安装、纯绿色、仅160KB

HTML表格专有属性和CSS


HTML表格很容易上手,一堆tr加td就可以显示一张表格了。复杂一点就是再加上th,colgroup,tbody,tfooter,caption之类。这些HTML里面的各种元素的确加强了表格的实用性和语义化,但table本身就有很大学问哦,毕竟是整个表格的根啊!
今天下面要总结包含对table本身的属性归纳和table专用的CSS比较:
attributes VS CSS properties
第一个比较容易混淆的是table的border属性和CSS中的border:
Attribute
border='1' //Sets or retrieves the width of the border to draw around the object. 
CSS
border-style:solid; //only set the border of the table, NOT the border inside table
border-width:1px;
border-color:#ccc;
if you set the border like table.border = 2; it will refer to the first border
第二个是Cellspacing和border-spacing
Attribute
cellspacing Sets or retrieves the amount of space between cells in a table. 
CSS
border-spacing:20px; the same as cellspacing, NOT for IE7/6
this two will work only if the border-collapse is separate
第三个是cellPadding,只有属性,没有对应的CSS
cellpadding: Sets or retrieves the amount of space between the border of the cell and the content of the cell.
there is no CSS property can do this
第四个table专有CSS:border-collapse, 决定border是独立还是聚拢
CSS border-collapse:collapse/separate;
This declaration takes two values:
  1. separate: keep borders separate. This is the default.
  2. collapse: merge borders of adjoining cells.
第五个table专有CSS: empty-cells
CSS empty-cells
empty-cells is not supported by IE.
This declaration takes two values:
  1. show: show empty cells (with a border). This is the default.
  2. hide: hide empty cells.
第六个table专有CSS:caption-side
CSS caption-side
Not supported by IE Windows.
Mozilla supports two extra values.
caption-side takes four values, even though W3C specifies only the first two:
  top. This is the default.
  bottom. This is the other official value.
  left. Mozilla extension.
  right. Mozilla


相关文档:

Html from 提交

关于Html
form
表单的提交,很容易。。。但如果不仔细还是能有很多错误。
提交的button name 属性为 submit form
的submit方法失效
。代码如下
# < html >
# < head > </ head >
# < script type = "text/javascript" >
# function getData(){
# ......

html相关语法【转】

<! - - ... - -> 注解
<!> 跑马灯
<marquee>...</marquee>普通捲动
<marquee behavior=slide>...</marquee>滑动
<marquee behavior=scroll>...</marquee>预设捲动
<marquee behavior=alternate>...</marquee>来回捲动
<marq ......

HTML、SHTML、DHTML、XHTML、XML区别


HTML - Hyper Text Mark-up Language - 超文本标记语言
     HTML-超文本标记语言,是WWW的描述语言。设计HTML语言的目的是为了能把存放在一台电脑中的文本或图形与另一台电脑中的文本或图形方便地联系在一起,形成有机的整体,人们不用考虑具体信息是在当前电脑上还是在网络的其它电脑上。我们只 ......

HTML基本功:FRAME标签的使用

    工作很多年了,可是基本上没有直接写过HTML页面.最多就是维护修改过一下别人写了.
    最近在做一个项目的基本设计的时候,要提案给客户的画面样例.因此开始自己写假的HTML画面.为了节省时间,其他人都只写画面的主要内容部分.而画面的头部,底部以及主菜单,子菜单都用frame来体现.
  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号