html表格线条不显示,css display:表格不显示边框
生活随笔
收集整理的這篇文章主要介紹了
html表格线条不显示,css display:表格不显示边框
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
.table { display: table;}
.tablerow { display: table-row; border:1px solid black;}
.tablecell { display: table-cell; }
Helloworldfoobar根據(jù)我的理解,應(yīng)該在我通過tablerow類指定的每一行上畫一個(gè)黑色邊框.但邊框不會(huì)出現(xiàn).
我想改變一行的高度.如果我用'px'指定它 - 它工作.但是,如果我給它一個(gè)% - 不會(huì)工作.我試過以下
.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 %
}
某處出了點(diǎn)問題,但我無法理解在哪里.請幫忙!
總結(jié)
以上是生活随笔為你收集整理的html表格线条不显示,css display:表格不显示边框的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 华为鸿蒙智慧屏评价,华为智慧屏 S真实感
- 下一篇: html如何控制弹窗位置,控制弹窗展示顺