jquery - 表格分页 + 表格样式 - 如何在最后显示的行上获得圆角边缘
问题描述
我的网站上显示了一个分页的表格。我引用了这个问题的第一个答案:Show N rows per page in HTML table以弄清楚如何进行分页。
问题是我的桌子是这样设计的:
table tr:first-child th:first-child {
border-top-left-radius: 40px;
}
table tr:first-child th:last-child {
border-top-right-radius: 40px;
}
table tr:last-child td:first-child {
border-bottom-left-radius: 40px;
}
table tr:last-child td:last-child {
border-bottom-right-radius: 40px;
}
这样做的效果是整个桌子的每个“角落”都是圆形的。我希望分页表也有圆角 - 但是,我似乎无法修改分页代码以在底部两个角添加圆角样式。我真的被困住了。
任何帮助表示赞赏!如果您需要更多信息,请与我们联系。
这是一个举个例子的小提琴:https ://jsfiddle.net/hermana/8nou03tc/37/
例如,当我将行数设置为 5 时,我希望显示的最后两行显示为四舍五入。
解决方案
@AndyHoffman 在评论中回答了这个问题。看到这个小提琴。
table {
background-color: black;
border-collapse: separate;
border-spacing: 0;
overflow: hidden;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}
推荐阅读
- .net-standard - AppVeyor 的 .NET Core .csproj 补丁没有任何影响
- r - 使用切片和组的 Dplyr 解决方案
- c# - 关于设置选秀/跳棋游戏的建议
- mysql - 在mysql中使用group by查找最小列值
- c# - C# 复杂树 - 组件数据结构
- apache-nifi - 从流文件内容中提取多行内容
- python - 多处理比 Windows 中的串行处理慢(但在 Linux 中不是)
- javascript - 如何通过异步函数设置反应父组件状态,然后将此状态作为道具传递给子组件?
- javascript - 更改图像 attr src 不适用于 safari?
- node.js - Ramda 在 Mongoose 查询回调中不起作用