900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > html表格线条不显示 css display:表格不显示边框

html表格线条不显示 css display:表格不显示边框

时间:2020-10-30 14:45:15

相关推荐

html表格线条不显示 css display:表格不显示边框

.table { display: table;}

.tablerow { display: table-row; border:1px solid black;}

.tablecell { display: table-cell; }

Helloworldfoobar

根据我的理解,应该在我通过tablerow类指定的每一行上画一个黑色边框.但边框不会出现.

我想改变一行的高度.如果我用'px'指定它 - 它工作.但是,如果我给它一个% - 不会工作.我试过以下

.tablerow {

display: table-row;

border:1px solid black;

position: relative; //not affecting anything and the border disappears!!

//position: absolute; // if this is set,the rows overlaps and the border works

height: 40%; // works only if specified in px and not in %

}

某处出了点问题,但我无法理解在哪里.请帮忙!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。