角材质表,展开时具有可扩展的行背景色

时间:2019-07-24 22:53:28

标签: css angular angular-material

如何在扩展行时更改其背景颜色,然后在不再扩展行时将其恢复为正常颜色? Angular Material示例提供的CSS展示了如何在“悬停”和“活动”期间着色,但在展开时不着色。

tr.example-element-row:not(.example-expanded-row):hover {
  background: #f5f5f5;
}

tr.example-element-row:not(.example-expanded-row):active {
  background: #efefef;
}

1 个答案:

答案 0 :(得分:0)

如果只想在展开时更改行的背景颜色(而不是展开的细节部分),则可以使用以下CSS:

/home/noriodebrume/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/sprockets-3.6.3/lib/sprockets/digest_utils.rb:47: warning: constant ::Fixnum is deprecated
/home/noriodebrume/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/sprockets-3.6.3/lib/sprockets/digest_utils.rb:51: warning: constant ::Bignum is deprecated
/home/noriodebrume/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:110: warning: constant ::Fixnum is deprecated
/home/noriodebrume/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:111: warning: constant ::Bignum is deprecated
  

如果您还想给行的扩展部分上色,请看一下   在   this   堆叠闪电战。