解!交替的表行颜色(CSS表达式的乐趣) [英] Solution! Alternating table row colors (fun with CSS Expressions)

查看:64
本文介绍了解!交替的表行颜色(CSS表达式的乐趣)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://www.mattkruse.com/temp/css_expressions.html


其中一个标准的CSS问题是我如何用CSS遮蔽其他每一行表格

a不同的颜色?


答案通常是1)你不能(还),2)在每一个上面放一个班级

tr,或者3)用javascript来做你的造型。


好​​吧,我最近一直在玩CSS表达式而且我已经找到了一个更简单的解决方案它适用于IE5.5 +,使用表达式。如果

你正在创建一个专门使用IE的网络应用程序,或者如果你想为大多数网站访问者添加这个功能(使用IE浏览器),那么你可以在上面的url中使用

技术。在那个网址上还有其他一些有趣的东西

CSS表达式也可以。


我意识到CSS表达式是非标准的,而不是一个解决方案

每个人都会觉得可以接受。但对于那些可以接受有限的浏览器支持(仅限IE)的人来说,它们非常强大和方便。在

项目中,IE是唯一用于访问网络应用程序的浏览器,我认为这对我来说将是一个很好的解决方案。而且在未来,随着CSS的发展和浏览器支持更高级的选择器,CSS文件可以简单地更改,而无需更改内容中的任何内容。


想法?


-

Matt Kruse
http://www.JavascriptToolbox.com

解决方案

" ;马特克鲁斯 <是ne ******** @ mattkruse.com>在消息中写道

news:ch ********* @ news2.newsguy.com ...

http://www.mattkruse.com/temp/css_expressions.html

一个标准的CSS问题是如何用CSS遮蔽每一张桌子
一行?

答案通常是1)你可以'' t(还),2)在每个其他的上面放一个类,或者3)使用javascript为你做样式。

好吧,我一直在玩CSS表达式最近我发现了一个更简单的解决方案,它可以在IE5.5 +中运行,使用表达式。
如果你正在创建一个web应用程序,使用IE浏览器,或者如果你想为大多数网站访问者添加这个功能(使用IE),那么你可以在上面的网址中使用
技术。在那个网址上还有一些其他有趣的东西,CSS表达也可以做。

我意识到CSS表达式是非标准的,而不是每个人都能接受的解决方案。但对于那些可以接受有限浏览器支持(仅限IE)的人来说,它们非常强大和方便。在IE是唯一用于访问Web应用程序的浏览器的项目中,我认为这对我来说将是一个很好的解决方案。而且在未来,随着CSS的发展和浏览器支持更高级的选择器,CSS文件可以简单地更改,而无需更改内容中的任何内容。

想法?




我使用基于gecko的浏览器,27%的访问者也是如此。一个只有IE的解决方案

对我来说根本不是解决方案。


哪些观众只使用IE 5.5+?也许一个公司内部网使用Windows

而没有其他O / S,计划总是使用IE而不是其他O / S,并且知道

它的计划永远不会更改。解决你的解决方案是一种奇怪的好处




" Matt Kruse" <是ne ******** @ mattkruse.com>写道:

我意识到CSS表达式是非标准的,而不是每个人都能接受的解决方案。

想法?



请注意www在这个组的名称中,因此你的方法是关于话题

这里。我建议你去看看你的发明。在

microsoft。*层次结构中。


-

Spartanicus


Matt Kruse写道:

http:/ /www.mattkruse.com/temp/css_expressions.html

其中一个标准的CSS问题是如何用CSS将每个其他表格行遮蔽不同的颜色 ?"

答案通常是1)你不能(还),2)在每一个上面上课,或者3)使用javascript来做样式你好。我最近一直在玩CSS表达式,而且我已经找到了一个更简单的解决方案,它适用于IE5.5 +,使用表述QUOT ;.如果您正在创建一个专门使用IE的Web应用程序,或者如果您想为大多数网站访问者添加此功能(使用IE),那么您可以使用
上面的网址中的技术。在那个网址上还有一些其他有趣的东西,CSS表达也可以做。

我意识到CSS表达式是非标准的,而不是每个人都能接受的解决方案。但对于那些可以接受有限浏览器支持(仅限IE)的人来说,它们非常强大和方便。在IE是唯一用于访问Web应用程序的浏览器的项目中,我认为这对我来说将是一个很好的解决方案。而且在未来,随着CSS的发展和浏览器支持更高级的选择器,CSS文件可以简单地更改,而无需更改内容中的任何内容。

想法?




我绝对没有用,但与前两个人不同

我不打算做任何剪切评论或任何事情就是这样。


恭喜你做出有人觉得有用的东西。现在

尝试看看你是否能想到让它在每个浏览器中运行的方法;)


问候,


Stuart。


http://www.mattkruse.com/temp/css_expressions.html

One of the standard CSS questions is "how can I shade every other table row
a different color with CSS?"

The answers are usually 1) you can''t (yet), 2) put a class on every other
tr, or 3) use javascript to do the styling for you.

Well, I''ve been playing the CSS expressions quite a bit lately and I''ve
found a much simpler solution which works in IE5.5+, using "expressions". If
you''re creating a web app that uses exclusively IE, or if you want to add
this feature for the majority of site visitors (using IE), then you can use
the technique in the url above. At that url are some other fun things that
CSS expressions can do also.

I realize the CSS expressions are non-standard and not a solution which
everyone will find acceptable. But for those that can accept the limited
browser support (IE only) then they are quite powerful and convenient. On
projects where IE is the only browser being used to access the web app, this
is going to be a great solution for me, I think. And in the future, as CSS
evolves and browsers support more advanced selectors, the CSS file can be
changed simply without needing to change anything in the content.

Thoughts?

--
Matt Kruse
http://www.JavascriptToolbox.com

解决方案

"Matt Kruse" <ne********@mattkruse.com> wrote in message
news:ch*********@news2.newsguy.com...

http://www.mattkruse.com/temp/css_expressions.html

One of the standard CSS questions is "how can I shade every other table
row
a different color with CSS?"

The answers are usually 1) you can''t (yet), 2) put a class on every other
tr, or 3) use javascript to do the styling for you.

Well, I''ve been playing the CSS expressions quite a bit lately and I''ve
found a much simpler solution which works in IE5.5+, using "expressions".
If
you''re creating a web app that uses exclusively IE, or if you want to add
this feature for the majority of site visitors (using IE), then you can
use
the technique in the url above. At that url are some other fun things that
CSS expressions can do also.

I realize the CSS expressions are non-standard and not a solution which
everyone will find acceptable. But for those that can accept the limited
browser support (IE only) then they are quite powerful and convenient. On
projects where IE is the only browser being used to access the web app,
this
is going to be a great solution for me, I think. And in the future, as CSS
evolves and browsers support more advanced selectors, the CSS file can be
changed simply without needing to change anything in the content.

Thoughts?



I use a gecko-based browser, as do 27% of my visitors. An IE-only solution
is no solution at all for me.

What audience uses IE 5.5+ only? Maybe a company intranet that uses Windows
and no other O/S, that plans always to use IE and no other O/S, and knows
that its plans will never change. Methinks your solution is a curiousity
only.


"Matt Kruse" <ne********@mattkruse.com> wrote:

I realize the CSS expressions are non-standard and not a solution which
everyone will find acceptable.

Thoughts?



Note the "www" in this group''s name, hence your "method" is off topic
here. I''d suggest you go and crow about your "invention" in the
microsoft.* hierarchy.

--
Spartanicus


Matt Kruse wrote:

http://www.mattkruse.com/temp/css_expressions.html

One of the standard CSS questions is "how can I shade every other table row
a different color with CSS?"

The answers are usually 1) you can''t (yet), 2) put a class on every other
tr, or 3) use javascript to do the styling for you.

Well, I''ve been playing the CSS expressions quite a bit lately and I''ve
found a much simpler solution which works in IE5.5+, using "expressions". If
you''re creating a web app that uses exclusively IE, or if you want to add
this feature for the majority of site visitors (using IE), then you can use
the technique in the url above. At that url are some other fun things that
CSS expressions can do also.

I realize the CSS expressions are non-standard and not a solution which
everyone will find acceptable. But for those that can accept the limited
browser support (IE only) then they are quite powerful and convenient. On
projects where IE is the only browser being used to access the web app, this
is going to be a great solution for me, I think. And in the future, as CSS
evolves and browsers support more advanced selectors, the CSS file can be
changed simply without needing to change anything in the content.

Thoughts?



I have absolutely no use for this, but unlike the previous two people
I''m not going to make any cutting remarks or anything like that.

Congratulations on making something that someone might find useful. Now
try and see if you can think of a way to get it working in every browser ;)

Regards,

Stuart.


这篇关于解!交替的表行颜色(CSS表达式的乐趣)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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