首页 > 解决方案 > 不应用边界半径。我尝试在 tr 标签上应用边框半径,但它不起作用

问题描述

不应用边界半径。我尝试在 tr 标签上应用边框半径,但它不起作用

    <table  align="center" border="0" cellspacing="0" cellpadding="0" width="80%"  >
        <h2>Let the borders collapse</h2>
    <tr class="border">
        <th class="side">Firstname</th>
        <th>Lastname</th>
        <th class="side">Lastname</th>
    </tr>
 
    </table>
    

  </td></tr>
</table>

https://jsfiddle.net/p4wm06kg/3/

标签: htmlcss

解决方案


https://codepen.io/turbo_baguettes/pen/gOmzGNN

对我来说很好

.border {
  /* margin: auto;  */
  border-style: hidden;
  border-spacing: 0;
  overflow: auto;
  border-collapse: separate !important;
  /* border-spacing: 0; */
  -moz-border-radius: 6px;
  /* -webkit-border-radius: 6px; */
  border-radius: 10px;
  max-width: 100%;
  /* border-right: none;
            border-left: none; */
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  
  /* TR BORDER HERE */
  border: 5px solid pink;
}


推荐阅读