【问题标题】:Add normal table tag CSS to tabulator table [closed]将普通表格标签 CSS 添加到制表符表格 [关闭]
【发布时间】:2021-02-10 13:51:03
【问题描述】:

我有几个 css 文件要为表标签添加类,例如<table><th><tr><td>。我使用制表符创建了一个表格,但它使用标签呈现。有没有办法可以将我的自定义 CSS 添加到基于制表符 div 标签的表格中??

【问题讨论】:

    标签: css tabulator custom-formatting


    【解决方案1】:

    Tabulator 比标准的 HTML 表格高级得多,因此无法使用 table 标签构建它。相反,它是使用一系列 div 构建的,其中包含定义其用途和样式的类。

    Styling Documentation 包含用于该表的类的完整列表。

    因此,只需将 CSS 中的标签换成类即可。

    例如,这个:

    table{
        border:2px solid black;
    }
    

    会变成:

    .tabulator{
        border:2px solid black;
    }
    

    下面是一个html表对应的类列表:

    • table - .tabulator
    • tr - .tabulator-row
    • td - .tabulator-cell
    • th - .tabulator-col

    【讨论】:

      猜你喜欢
      • 2019-08-10
      • 1970-01-01
      • 2023-03-21
      • 1970-01-01
      • 1970-01-01
      • 2019-01-30
      • 2016-01-08
      • 1970-01-01
      • 2016-12-28
      相关资源
      最近更新 更多