Html <;tr>;边框顶部工作,但不包括边框底部
问题就在这里。我有自己的代码,这样我就可以在每个Html <;tr>;边框顶部工作,但不包括边框底部,html,css,css-tables,Html,Css,Css Tables,问题就在这里。我有自己的代码,这样我就可以在每个项的顶部和底部看到边框。但是,我只看到底部的内容,除了顶部元素 .tstyle1 { margin: 10px 0 0 30px; width: 950px; } .tstyle1 tr { height: 120px; border-bottom: 1px solid black; border-collapse: separate; border-top: 1px solid black;
项的顶部和底部看到边框。但是,我只看到底部的内容,除了顶部元素
.tstyle1 {
margin: 10px 0 0 30px;
width: 950px;
}
.tstyle1 tr {
height: 120px;
border-bottom: 1px solid black;
border-collapse: separate;
border-top: 1px solid black;
border-bottom: 1px solid orange;
}
.tstyle1 td {
border: none;
}
这是重新创建的问题。
试试看
添加
显示:块
到您的.tstyle1 tr
问题在于您的边框底部定义只是覆盖了边框顶部定义。所以下面的颜色没有显示出来。尝试设置边框底部:无
,您将看到顶部边框显示
@Pricey的建议有点神奇。这是个坏主意,因为表行是表行而不是块元素。这可能会导致意外的副作用。