content logo

Bootstrap Buttons:

Sliding Buttons with Bootstrap

Buttons help users do different actions similar to a link but in a cooler and more stylish way. There are many key factors to take in when designing a button for your website and the most important one of them is to create the right interactions and style choices for them. You must know which buttons to use a lot of effects and animations on and which buttons should be left with a basic design. Typically, you want the more important buttons to always look bold. This is why you put more effort into designing it. that is how users feel about it as well. If the developer has put so much effort into creating a single button for the website, then that button must be really important, right? This thought brings the users’ curiosity and so they want to click on it to see how special it is for themselves.

In this post we have an animated button with some nice effects. The code below includes a Bootstrap button with sliding effect. The slide animation is activated on hover. This Bootstrap sliding button displays either the icon or the name of the action normally but when you hover your mouse over it, a sliding animation takes place and it changes to either the icon or the label depending on what the original button was. Using this Bootstrap animating button could be just the right thing to make your website look more professional.

#

Bootstrap Animating Button

#

Animated Button

#

Bootstrap Sliding Button

#

Bootstrap Button with Sliding

<!-- This script got from frontendfreecode.com -->
<div class="container">
  <div class="row">
    <div class="col-md-12">
      <h1>Animated button</h1>
    </div>
  </div>
  <div class="well text-center">
    <div class="row">
      <div class="col-md-3">
        <button class="btn-animated btn btn-primary btn-lg bnt-block">
        <div class="btn-cover">
          Download
        </div>
        <div class="btn-revealer">
          <i class="glyphicon glyphicon-download"></i>
        </div>
      </button>
      </div>
      <div class="col-md-3">
        <button class="btn-animated btn btn-primary btn-lg bnt-block">
        <div class="btn-cover">
          Save
        </div>
        <div class="btn-revealer">
          <i class="glyphicon glyphicon-save"></i>
        </div>
      </button>
      </div>
      <div class="col-md-3">
        <button class="btn-animated btn btn-primary btn-lg bnt-block">
        <div class="btn-cover">
          <i class="glyphicon glyphicon-save"></i>
        </div>
        <div class="btn-revealer">
          Save
        </div>
      </button>
      </div>
            <div class="col-md-3">
        <button class="btn-animated btn btn-primary btn-lg bnt-block">
        <div class="btn-cover">
          <i class="glyphicon glyphicon-download"></i>
        </div>
        <div class="btn-revealer">
          Download
        </div>
      </button>
      </div>
    </div>
  </div>
</div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
.btn{
margin:10px!important;
}
.btn-animated {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.btn-animated .btn-revealer, .btn-animated .btn-cover {
  width: 100%;
  height: 100%;
  padding: 10px;
  transition: all 0.3s ease-in-out;
  display: inline-block;
}
.btn-animated:hover .btn-cover, .btn-animated:hover .btn-revealer {
  transform: translateX(-100%);
}
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.min.css'>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.min.css'>
<style>
.btn{
margin:10px!important;
}
.btn-animated {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.btn-animated .btn-revealer, .btn-animated .btn-cover {
  width: 100%;
  height: 100%;
  padding: 10px;
  transition: all 0.3s ease-in-out;
  display: inline-block;
}
.btn-animated:hover .btn-cover, .btn-animated:hover .btn-revealer {
  transform: translateX(-100%);
}
</style>

</head>
<body>
<div class="container">
  <div class="row">
    <div class="col-md-12">
      <h1>Animated button</h1>
    </div>
  </div>
  <div class="well text-center">
    <div class="row">
      <div class="col-md-3">
        <button class="btn-animated btn btn-primary btn-lg bnt-block">
        <div class="btn-cover">
          Download
        </div>
        <div class="btn-revealer">
          <i class="glyphicon glyphicon-download"></i>
        </div>
      </button>
      </div>
      <div class="col-md-3">
        <button class="btn-animated btn btn-primary btn-lg bnt-block">
        <div class="btn-cover">
          Save
        </div>
        <div class="btn-revealer">
          <i class="glyphicon glyphicon-save"></i>
        </div>
      </button>
      </div>
      <div class="col-md-3">
        <button class="btn-animated btn btn-primary btn-lg bnt-block">
        <div class="btn-cover">
          <i class="glyphicon glyphicon-save"></i>
        </div>
        <div class="btn-revealer">
          Save
        </div>
      </button>
      </div>
            <div class="col-md-3">
        <button class="btn-animated btn btn-primary btn-lg bnt-block">
        <div class="btn-cover">
          <i class="glyphicon glyphicon-download"></i>
        </div>
        <div class="btn-revealer">
          Download
        </div>
      </button>
      </div>
    </div>
  </div>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>

</body>
</html>
Preview