Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Inner Gradient On Top of Bootstrap 3 Button when Clicked

Can you please let me know how I can remove the gradient from the Bootstrap 3 Buttons when users click on the buttons: like what is showing in the below image:

enter image description here

.btn {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.42857143;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  background-image: none;
  border: 1px solid transparent;
  border-radius: 4px;
}
.btn:focus,
.btn:active:focus,
.btn.active:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
.btn:hover,
.btn:focus {
  color: #333;
  text-decoration: none;
}
.btn:active,
.btn.active {
  background-image: none;
  outline: 0;
  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
like image 933
Suffii Avatar asked Jun 13 '14 20:06

Suffii


2 Answers

A box shadow is applied during the :active state of the button.

Try this:

.btn:active
{
    box-shadow:none;
}
like image 197
Joe Avatar answered Jan 03 '23 21:01

Joe


What you want to do is remove the box-shadow when the button is in the active state (being pressed). Here is a cross browser compatible way to do that:

.btn:active{
    -webkit-box-shadow: none;
    box-shadow: none;
    -webkit-transition: none;
    transition: none;
}
like image 33
Denzil Avatar answered Jan 03 '23 20:01

Denzil