table的border颜色问题
在看W3C关于table的文档时,看到
The following rules determine which border style "wins" in case of a conflict:
Borders with the 'border-style' of 'hidden' take precedence over all other conflicting borders. Any border with this value suppresses all borders at this location. Borders with a style of 'none' have the lowest priority. Only if the border properties of all the elements meeting at this edge are 'none' will the border be omitted (but note that 'none' is the default value for the border style.) If none of the styles are 'hidden' and at least one of them is not 'none', then narrow borders are discarded in favor of wider ones. If several have the same 'border-width' then styles are preferred in this order: 'double', 'solid', 'dashed', 'dotted', 'ridge', 'outset', 'groove', and the lowest: 'inset'. If border styles differ only in color, then a style set on a cell wins over one on a row, which wins over a row group, column, column group and, lastly, table. When two elements of the same type conflict, then the one further to the left (if the table's 'direction' is 'ltr'; right, if it is 'rtl') and further to the top wins.
在最后一点中说到,如果border style只在颜色上有区别,那么右下角的优先级更高。
但是测试下来的结果并不是这样:table的border颜色测试
为虾米呢?哪位大侠出来解答一下~
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我虽然也不是很懂这个,但是从结果看,的确是右侧和下侧的优先级最高呀,因为你看每当有重叠的时候,唯独是右侧和下侧去覆盖别人,从来没有被覆盖过~