【问题标题】:Adjust tabulator row height in different tables调整不同表格中的制表符行高
【发布时间】:2019-10-10 08:37:56
【问题描述】:

我在同一页面中有 2 个制表符表(#tableC id="Cuentas" 和 #tableM id="Movimientos"),每个表都应该有不同的行高。

我已经在 CCS 文件中尝试过

tableC.tabulator-row.tabulator-cell { height:40px;} 
tableM.tabulator-row.tabulator-cell { height:100px;} 

#Cuentas.tabulator-row.tabulator-cell { height:40px;} 
#Movimientos.tabulator-row.tabulator-cell { height:100px;} 

tableC.tabulator-row.element.style { height:40px;} 
tableM.tabulator-row.element-style { height:100px;} 

还有更多的组合, 它们都不起作用

如果我写

.tabulator-row.tabulator-cell { height:40px;} 

如果固定页面中所有表格的行高

如何为不同的表格设置不同的行高

【问题讨论】:

  • 可以包含 HTML 吗?
  • #Cuantas 后面有空格吗?在上面的代码中,CSS 选择器似乎选择了具有#Cuantas.tabulator-row 的元素

标签: javascript css tabulator


【解决方案1】:

您需要在id选择器和类选择器之间添加一个空格。

#Cuentas .tabulator-row { height:10px;} 
#Movimientos .tabulator-row { height:40px;}

工作示例:https://jsfiddle.net/FlamFilo/0y2mga6o/3/

见:https://developer.mozilla.org/en-US/docs/Web/CSS/Descendant_combinator

【讨论】:

  • 很高兴为您提供帮助,欢迎来到 Stack Overflow。如果此答案或任何其他答案解决了您的问题,请将其标记为已接受。这样,使用搜索引擎找到问题的人可以更加确信答案是正确的
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-02-05
  • 1970-01-01
  • 1970-01-01
  • 2018-10-06
  • 1970-01-01
  • 1970-01-01
  • 2019-12-15
相关资源
最近更新 更多