我可以制作带圆角的桌线吗?

Man*_*anu 16 css css3

我一直在使用HTML和CSS来设置简历的样式,但是我在设置<tr>元素时遇到了困难.

这不适用于桌子内吗?

-moz-border-radius: 5x;
-webkit-border-radius: 5px;
Run Code Online (Sandbox Code Playgroud)

Tat*_*nen 25

是的,它适用于表格tdth元素,但不是tr.您也可以使用它table来围绕整个桌子的角落.

如果要对一行单元格进行舍入以使左侧和最右侧的元素四舍五入,则需要使用:first-child:last-child伪类:

tr td:first-child {
    -moz-border-radius-topleft: 5px;
    -moz-border-radius-bottomleft: 5px;
    -webkit-border-top-left-radius: 5px;
    -webkit-border-bottom-left-radius: 5px;

}

tr td:last-child {
    -moz-border-radius-topright: 5px;
    -moz-border-radius-bottomright: 5px;
    -webkit-border-top-right-radius: 5px;
    -webkit-border-bottom-right-radius: 5px;
}
Run Code Online (Sandbox Code Playgroud)

first-childIE6不支持,虽然IE7增加了对它的支持,但它仍然缺乏last-child.但是在你的情况下这并不重要,因为border-radius无论如何都不适用于那些浏览器.