博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
colspan(HTML属性)
阅读量:2513 次
发布时间:2019-05-11

本文共 2125 字,大约阅读时间需要 7 分钟。

描述 (Description)

Just as the th element uses colspans, so can the td element to allow data to be shared across numerous columns in a table. The concept is best explained by comparing the example HTML above with the below table (where we indicate a person’s availability for Tuesday—when that person is free for the whole day—by spanning the cell across four time slots).

就像th元素使用colspans ,td元素也可以允许数据在表中的许多列之间共享。 通过将上面的示例HTML与下表进行比较,可以最好地解释这一概念(在下表中,我们将一个人分散在四个时隙中,表明该人在星期二有空,而该人全天都有空)。

td-colspans

When you’re introducing a colspan attribute, take care to ensure that each row is equivalent to the number of cells that would ordinary appear in the row. Some tables can become quite complicated with a mixture of colspan and rowspan attributes, and this is not something that you’re advised to hand-code—that’s just asking for trouble! It’s much better to use a WYSIWYG editor, such as Dreamweaver, MS Expression, or something similar, which will allow you to merge and unmerge cells very easily, and takes care of these attributes for you.

引入colspan属性时,请注意确保每一行都等于该行中普通显示的单元格数量。 某些表可能由于混合了colspanrowspan属性而变得非常复杂,因此建议您不要手工编写代码,这只是自找麻烦! 最好使用WYSIWYG编辑器,例如Dreamweaver,MS Expression或类似的东西,它将使您非常容易地合并和取消合并单元格,并为您处理这些属性。

Note that when you use the rowspan attribute, you can’t span a cell beyond the boundary of its containing rowgroup (namely the thead, tfoot, or tbody elements). So if the tbody comprises ten rows, the rowspan of a cell that’s defined in the first row can’t have a value greater than “10”.

请注意,在使用rowspan属性时,不能将单元格跨到其包含rowgroup (即theadtfoottbody元素)的边界之外。 因此,如果tbody包含十行,则在第一行中定义的单元格的行跨度不能具有大于“ 10”的值。

(Example)

This example shows an extract from a calendar, with a person’s availability apparently spanning the whole day, as shown in the above table:

此示例显示了日历的摘录,一个人的空闲时间显然跨越了一天,如上表所示:

  Tue  Free

(Value)

This attribute takes a number, which should equal the number of cells that this single td should replace. There’s also a special value of "0", which should inform the browser to span the cell to the end of the current group of columns.

此属性采用一个数字,该数字应等于此单个td应该替换的单元数。 还有一个特殊值"0" ,它应该通知浏览器将单元格跨到当前列组的末尾。

翻译自:

转载地址:http://cbrgb.baihongyu.com/

你可能感兴趣的文章
【BZOJ 4059】 (分治暴力|扫描线+线段树)
查看>>
BZOJ 1066 蜥蜴(网络流)
查看>>
提高批量插入数据的方法
查看>>
Linux重启Mysql命令
查看>>
前端模块化:RequireJS(转)
查看>>
linux 内核的优化
查看>>
Spark笔记之DataFrameNaFunctions
查看>>
Oracle 时间函数 (转)
查看>>
近端梯度算法(Proximal Gradient Descent)
查看>>
DRM-内容数据版权加密保护技术学习(中):License预发放实现 (转)
查看>>
TCP与UDP协议
查看>>
php上传文件如何保证上传文件不被改变或者乱码
查看>>
目录遍历代码
查看>>
iOS MD5加密实现方法
查看>>
页面中调用系统常用的对话框需要用到的classid
查看>>
cygwin下的目录软连接
查看>>
eclipse控制台不显示输出的解决办法
查看>>
Java中的TCP/UDP网络通信编程
查看>>
Trie树
查看>>
Mysql支持的数据类型(总结)
查看>>