Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个有 10 列的表。我如何编写为TD2 或 7 位置的所有 s 设置样式的 css 类?
TD
就像是:
tr td:nth-child(2), tr td:nth-child(7) { /* style here */ }
IE8 不支持它。但这里有一个非常好的 polyfill:ie9.js。
备择方案: