< colgroup>< col class =" behold">< / colgroup> [英] <colgroup><col class="behold"></colgroup>

查看:97
本文介绍了< colgroup>< col class =" behold">< / colgroup>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到的唯一支持

< colgroup>< col class =" behold">< / colgroup>

的浏览器申请了CSS样式到整列,是Microsoft Internet

资源管理器。我被告知它不应该这样做,因为这不是规范的一部分。


如何将样式应用于整个列?当然你没有

来写每一行上的
< td class =" behold"

>
-


Roedy Green加拿大心灵产品

Java词汇表
http://mindprod.com

The only browser I have encountered that supports
<colgroup><col class="behold"></colgroup>
to apply a CSS style to a whole column, is Microsoft Internet
Explorer. I have been told it SHOULD NOT do so, since this is not
part of the specification.

How then to you apply styles to entire columns? Surely you don''t have
to write

<td class="behold"on every row item.

--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

推荐答案

Roedy Green写道:
Roedy Green wrote:

我遇到的唯一支持的浏览器

< colgroup>< col class =" behold">< / colgroup> ;

将CSS样式应用于整个列,是Microsoft Internet

Explorer。我被告知它不应该这样做,因为这不是规范的一部分。
The only browser I have encountered that supports
<colgroup><col class="behold"></colgroup>
to apply a CSS style to a whole column, is Microsoft Internet
Explorer. I have been told it SHOULD NOT do so, since this is not
part of the specification.



参见 http://www.w3.org/TR/CSS21/tables.html#columns ,您可以将

属性边框,背景,宽度和可见性应用于列和

列组。所以

col.behold {

background-color:lightblue;

}

应该这样做。

-


Martin Honnen
http://javaScript.FAQTs.com/

See http://www.w3.org/TR/CSS21/tables.html#columns, you can apply the
properties border, background, width, and visibility to columns and
column groups. So
col.behold {
background-color: lightblue;
}
should do.
--

Martin Honnen
http://JavaScript.FAQTs.com/


Scripsit Roedy Green:
Scripsit Roedy Green:

我遇到的唯一支持

< colgroup>< col class =" behold">< / colgroup>

以应用CSS样式的浏览器整列,是微软互联网

资源管理器。我被告知它不应该这样做,因为这不是规范的一部分。
The only browser I have encountered that supports
<colgroup><col class="behold"></colgroup>
to apply a CSS style to a whole column, is Microsoft Internet
Explorer. I have been told it SHOULD NOT do so, since this is not
part of the specification.



对,虽然这是一个棘手且令人困惑的问题。

Right, though this is a tricky and confusing issue.


如何应用样式到整栏?肯定你没有

来写每个行项目上的
< td class =" behold"。
How then to you apply styles to entire columns? Surely you don''t have
to write

<td class="behold"on every row item.



如果你想覆盖全部,你肯定有。浏览器。但你可以通过结合两个

策略覆盖几乎所有支持CSS的浏览器:

a)使用< colapproach覆盖IE

b)使用上下文选择器来涵盖符合标准的浏览器;例如

td:first-child + td + td {...}

是一种为第3列分配样式的方法,包含
仅限
td单元格。


-

Jukka K. Korpela(Yucca)
http://www.cs.tut.fi/~jkorpela/

Surely you have, if you wish to cover "all" browsers. But you can cover
virtually all significant CSS-enabled browsers by combining two
strategies:
a) use the <colapproach to cover IE
b) use contextual selectors to cover standards-conforming browsers; e.g.
td:first-child + td + td { ... }
is a way of assigning a style to the 3rd column, for rows that contain
td cells only.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


2008年8月2日星期六17:48:53 +0200,Martin Honnen< ma ******* @ yahoo.de>

写道,引用或间接引用某人说:
On Sat, 02 Aug 2008 17:48:53 +0200, Martin Honnen <ma*******@yahoo.de>
wrote, quoted or indirectly quoted someone who said :

>
参见 http://www.w3.org/TR/CSS21/tables.html#columns ,您可以申请
属性边框,背景,宽度以及列和
列组的可见性。所以

col.behold {

background-color:lightblue;

}
应该这样做。
>
See http://www.w3.org/TR/CSS21/tables.html#columns, you can apply the
properties border, background, width, and visibility to columns and
column groups. So
col.behold {
background-color: lightblue;
}
should do.



我的问题更多的是关于有效地将样式应用于整个列的标记的好处,希望在单行中,因为合理的

< colgroup>< col style =" behold"似乎不起作用。

我想你会指向一个实现的样式表/ html页面

w3 URL谈论的一些功能。我的大脑似乎比一些例子更好地推广,而不是阅读

律师语言空间。一旦我从看到一些

的例子中得到了一般的想法,那么规格对于收集细节更有意义。


-


Roedy Green加拿大心灵产品

Java词汇表
http://mindprod.com


这篇关于&lt; colgroup&gt;&lt; col class =&quot; behold&quot;&gt;&lt; / colgroup&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆