angular - Cannot change the color of the cell of table when hover -
i using angular2-meteor ng2-bootstrap. try change color when hover on cell of table.
<table class="table table-hover table-bordered"> <thead> <td>header1</td> <td>header2</td> <td>header3</td> </thead> <tbody> <tr> <td>lorem</td> <td>aut</td> <td>ieleniti</td> </tr> <tr> <td>lorem</td> <td>esse</td> <td>ullam</td> </tr> </tbody> </table> .table-hover > tbody > tr { &:hover { > td { background-color: #ffffff; } > th { background-color: #ffffff; } } > td:hover { background-color: #f5f5f5 !important; } }
the code runs in pure bootstrap, can see here.
but when use angular2 , meteor, css code won't work more.
i found problem, project angular2-meteor project. @ same time, using sass meteor.
when use styles: [...]
, sass meteor won't compile it.
there 2 solutions, both work:
create file xxx.scss, , change use
styleurls: ['xxx.scss']
use css instead of scss codes in
styles: [...]
.
p.s. these days met lot of weird style problems, because of problem.
for example, scss supports
//
comment, css not. when write codes instyles: [...]
, css codes before//
work well, codes after//
won't work. , didn't error in browser , compiler.hope can people met similar style problems.
Comments
Post a Comment