【问题标题】:How to change colour of only used borders in html table?如何更改html表格中仅使用的边框的颜色?
【发布时间】:2017-08-28 19:23:46
【问题描述】:

我的 Rmd 演示文稿中有这张表:

这是通过stargazer(fit, type = "html")获得的

我尝试在我的 Rmd 中包含 css,例如:

table, th, td {border: 1px solid white;}

结果是:

我想为实际使用的边框重新着色。像这样(photoshop 编辑):

我的想法是使用 css 来执行此操作,因为我有 40 多个表。我该怎么做?

【问题讨论】:

    标签: html css r r-markdown stargazer


    【解决方案1】:

    所以你只是想改变颜色? 尝试只使用border-color 属性,否则添加大小和类型将创建一个新边框。例如,

    table, th, td {
      border-color: white;
    }
    

    【讨论】:

    • 诀窍是添加important like: table, th, td {border-color: white!important;}
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-02-11
    • 2014-02-11
    • 2020-06-14
    • 2018-01-26
    • 2017-01-03
    • 2013-11-09
    • 1970-01-01
    相关资源
    最近更新 更多