html - 带有圆边的 Jquery Mobile 表格

标签 html css jquery-mobile

我正忙于在 jquery Mobile 中使用回流表。我想让我的 table 的第一行和最后一行有圆边。我正在使用以下代码:

th:first-child {
   -moz-border-radius: 6px 0 0 0;
   -webkit-border-radius: 6px 0 0 0;
   border-radius: 6px 0 0 0;
}

th:last-child {
   -moz-border-radius: 0 6px 0 0;
   -webkit-border-radius: 0 6px 0 0;
   border-radius: 0 6px 0 0;
}

HTML类似这样;

<table>
<thead>
    <tr>
        <th>First column</th>
        <th>Second column</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td>Row one, cell one</td>
        <td>Row one, cell two</td>
    </tr>
    <tr>
        <td>Row two, cell one</td>
        <td>Row two, cell two</td>
    </tr>
    <tr>
        <td>Row three, cell one</td>
        <td>Row four, cell two</td>
    </tr>
</tbody>

从字面上看,我只想让最顶部和最底部的单元格具有圆 Angular 边缘。

最佳答案

这有点接近...

thead tr:first-child th:first-child {
   -moz-border-radius: 6px 0 0 0;
   -webkit-border-radius: 6px 0 0 0;
   border-radius: 6px 0 0 0;
}

thead tr:first-child th:last-child {
   -moz-border-radius: 0px 6px 0 0;
   -webkit-border-radius: 0px 6px 0 0;
   border-radius: 0px 6px 0 0;
}

tr:last-child td:first-child{
   -moz-border-radius: 0px 0px 0px 6px;
   -webkit-border-radius: 0px 0px 0px 6px;
   border-radius: 0px 0px 0px 6px;
}

tr:last-child td:last-child{
   -moz-border-radius: 0px 0px 6px 0px;
   -webkit-border-radius: 0px 0px 6px 0px;
   border-radius: 0px 0px 6px 0px;
}

关于html - 带有圆边的 Jquery Mobile 表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17296965/

相关文章:

Android WebView 字体最初未呈现

html - 控制水平子导航的高度

jquery - 如何使菜单类似于 linkedin.com 上的菜单

javascript - 为什么我无法选择列表框值?

javascript - 什么是先读 HTML 或 JavaScript?

html - 更改组合框样式

javascript - 如何在单色 React 中制作渐变背景?

javascript - 如何在 JQM 中为不同页面制作页码页眉

javascript - jQuery Mobile ui 响应表添加额外的标题

javascript - Angular Material 垫卡宽度作为内部文本宽度