How to achieve an .active class for a pressed in button?

0
Hi I want to show a pressed in button different than an unpressed button. I know that some buttons do get the .active bootstrapp class. How can I achieve that a custom button will receive also this .active class? Is it a specific button or so I can use?
asked
1 answers
1

Hi Rapido,

Yo can use the below example if you want to change all the default buttons active behavior;

  .btn:active, .mx-button:active, .btn-default:active, .btn-primary:active {
    background-color: #002412;
    border-color: #002412;
    color: #FFFFFF;
    }

or if you want to change a specific button then you can add custom class (for example btn-arrow) on that button and then style it in your css as shown in the example below;

  .btn-arrow:active {
  background: #ccf0dd;
  color: black;
  }

Hope this helps!

answered