AngularJS Material design - md-colors on button hover

前端 未结 1 1488
执念已碎
执念已碎 2021-01-15 09:36

Angular Material is awesome for creating colour-themed sites. As well is the usual palettes, you can create dynamic themes without SCSS, using directives like...

         


        
1条回答
  •  天命终不由人
    2021-01-15 09:48

    In case anyone is desperate to use md-colors as a hover state, its not possible according to the docs. But I created a work-around by setting the background color with md-colors, and hiding it behind another element. The hover state then makes the top layer transparent, so it appears to be a dynamically set hover state!

    You can see an example here:

    https://codepen.io/anon/pen/oGqPeE

    the html layout looks like this :

    
    

    0 讨论(0)
提交回复
热议问题