博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
css高级颜色_高级CSS表–使用CSS3替代行颜色
阅读量:2514 次
发布时间:2019-05-11

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

css高级颜色

CSS finally addresses an issue that I've been peeved wasn't fixed earlier. The DIV movement of getting away from table-based design taught us that tables should be used only when you're presenting a table of data on your website, yet no CSS selector/rule was created to allow us to shade alternate rows a different color. Isn't that a basic design / usability need?

CSS终于解决了一个我之前并不曾解决过的问题。 摆脱基于表的设计的DIV运动告诉我们,仅当您在网站上显示数据表时才应使用表,但尚未创建CSS选择器/规则来允许我们用不同的颜色来遮盖交替的行。 这不是基本的设计/可用性需求吗?

CSS3 will include a ":nth-child(argument)" pseudo-class which will allow us to control the display of alternate rows without using extra CSS classes, JavaScript, or server-side code to manage the alternating CSS class placement. The kicker? No one seems to fully support CSS3 yet. Here's how you'll be able to achieve this in the future.

CSS3将包含一个“:nth-​​child( argument )”伪类,它使我们能够控制替代行的显示,而无需使用额外CSS类,JavaScript或服务器端代码来管理替代CSS类的放置。 踢手? 似乎还没有人完全支持CSS3。 这是您将来如何实现此目标的方法。

tr:nth-child(odd)		{ background-color:#eee; }tr:nth-child(even)		{ background-color:#fff; }

Until all modern browsers support this, we'll need to use CSS classes and/or JavaScript. A problem fixed late is better than a problem not fixed at all.

在所有现代浏览器都支持此功能之前,我们将需要使用CSS类和/或JavaScript。 较晚解决的问题比根本不解决的问题要好。

翻译自:

css高级颜色

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

你可能感兴趣的文章
C# MySql 连接
查看>>
sk_buff Structure
查看>>
oracle的级联更新、删除
查看>>
多浏览器开发需要注意的问题之一
查看>>
Maven配置
查看>>
HttpServletRequest /HttpServletResponse
查看>>
SAM4E单片机之旅——24、使用DSP库求向量数量积
查看>>
从远程库克隆库
查看>>
codeforces Unusual Product
查看>>
hdu4348 - To the moon 可持久化线段树 区间修改 离线处理
查看>>
springMVC中一个class中的多个方法
查看>>
cxx signal信号捕获
查看>>
《Android开发艺术探索》读书笔记——Cha3.2.3改变布局参数实现View的滑动
查看>>
python闭包与装饰器
查看>>
Acegi 源码解释
查看>>
Activity的几种启动跳转方式
查看>>
LCA最近公共祖先Tarjan(离线)
查看>>
牛客练习赛16 E求值
查看>>
matlab rank
查看>>
Asp.net系列--基础篇(三)
查看>>