【问题标题】:how to apply custom css property in extent report如何在范围报告中应用自定义 CSS 属性
【发布时间】:2019-01-18 05:48:36
【问题描述】:

使用范围报告版本 4,

报告中有规定添加自定义css,

寻找正确的语法,通过尝试这两种方法都不适用:

 htmlReport.Config.CSS = "<styles>  <![CDATA[ .black-text { color: #fff !important; } ]]> </ styles>";

 htmlReport.Config.CSS = "<styles>  .black-text { color: #fff !important; }  </ styles>";

【问题讨论】:

  • 省略任何标签,只使用css。不需要样式和 CData。从 .black-text.. 开始。此外,已经有相关规定,您可以使用 text-white、text-black 等,而无需任何额外的 css。
  • 太好了,成功了。

标签: extentreports selenium-extent-report


【解决方案1】:

解决办法是,

htmlReport.Config.CSS = ".black-text { color: #fff !important; }";

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-25
    • 1970-01-01
    • 2021-12-28
    • 1970-01-01
    相关资源
    最近更新 更多