【发布时间】:2017-05-21 01:01:03
【问题描述】:
您好,当用户使用 css 单击按钮打印(window.print)时,我尝试从表格中删除边框,但它始终停留在打印页面中
这是我的css代码:
@media print{
body * {visibility: hidden;
}
table {
border:solid; white !important;
border-width:1px 0 0 1px !important;
border-bottom-style: none;
}
th, td{
border:solid; white !important;
border-width:0 1px 1px 0 !important;
border-bottom-style: none;
}
}
这个 css 给了我这个结果:
表格的底部边框显示如何删除它谢谢你
【问题讨论】:
-
首先,尝试使用
border:solid white !important;(在solid之后没有;)。 -
你能贴出你的html代码吗?
-
试试
border-bottom: none;
标签: html css media-queries