如何在表格行上添加边框半径 [英] How to add border radius on table row

查看:85
本文介绍了如何在表格行上添加边框半径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道我们喜欢怎么样式tr?

Does anyone know how to style tr as we like?

我已经在表格上使用了border-collapse,之后tr可以显示1px实体边框。

I've used border-collapse on table, after that tr's can display 1px solid border I give them.

但是,当我尝试 -moz-border-radius 时,它不工作。即使简单的边距也不起作用。

However, when I've tried -moz-border-radius, it doesn't work. Even simple margin doesn't work.

推荐答案

您只能对td应用border-radius,我已经通过使用这些样式的圆角表:

You can only apply border-radius to td, not tr or table. I've gotten around this for rounded corner tables by using these styles:

table { border-collapse: separate; }
td { border: solid 1px #000; }
tr:first-child td:first-child { border-top-left-radius: 10px; }
tr:first-child td:last-child { border-top-right-radius: 10px; }
tr:last-child td:first-child { border-bottom-left-radius: 10px; }
tr:last-child td:last-child { border-bottom-right-radius: 10px; }

请务必提供所有供应商前缀。以下是操作示例

Be sure to provide all the vendor prefixes. Here's an example of it in action.

这篇关于如何在表格行上添加边框半径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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