Header Ads

Niagahoster

Slide Out Card Buttons

Slide Out Card Buttons

CSS Code

@import url(https://fonts.googleapis.com/css?family=Josefin+Sans:700|Oswald:400:700);
body {
  background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMnEedxcsCYtIJsB-lbeVNybo7_Bwj4mUsMLfdOVm3yq3nJMRbBTAjWxlHofZUiARsEBS55HWvNAAPxvAHXCPQrY1O1kP7vvJjz9JB1Cwk1YupC5z2PB2-wJcF9EmDx8QL64ONZwQnOQ/s1600/felt-green.jpg);
}

h1 {
  font-size: 60px;
  font-family: 'Josefin Sans';
  text-transform: none;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.sleeve {
  position: relative;
  background: transparent;
  line-height: 2.5em;
  border: 0;
  padding: 0 40px 0 15px;
  border: 1px solid #aaa;
  border-radius: 4px 200px 0px 4px;
  background: linear-gradient(to bottom, #e1e1e1 0%, #e5e5e5 100%);
  font-family: 'Oswald';
  text-transform: uppercase;
  font-size: 30px;
  color: #333;
  text-shadow: 0px 1px 3px #fff;
  margin-right: 120px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  min-width: 170px;
}

.insert {
  position: absolute;
  left: 10px;
  top: 3%;
  display: block;
  z-index: -100;
  width: 100%;
  height: 94%;
  box-sizing: border-box;
  background: linear-gradient(to bottom, #a90329 0%, #8f0222 44%, #6d0019 100%);
  font-family: 'Oswald';
  font-size: 18px;
  color: #fff;
  text-shadow: 0 1px 0px rgba(0, 0, 0, 0.6);
  border-radius: 2px;
  text-align: right;
  padding-right: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 2px 2px 5px rgba(0, 0, 0, 0.5);
  transition: all 1s ease-in-out;
  border-right: 1px dotted rgba(0, 0, 0, 0.5);
}

.sleeve:hover .insert {
  text-align: right;
  width: 150%;
  transition: all 1s ease-in-out;
}

.insert.facebook {
  background: linear-gradient(to bottom, #497dc1 0%, #274772 100%);
}

.insert.twitter {
  background: linear-gradient(to bottom, #a9e4f7 0%, #0fb4e7 100%);
}

.insert.google {
  background: linear-gradient(to bottom, #ff3019 0%, #cf0404 100%);
}


HTML Code

<center>
  <h1>Slide-Out Buttons</h1><br>
  <button class="sleeve">
    Facebook
    <span class="insert facebook">25 likes</span>
  </button>
  <button class="sleeve">
    Twitter
    <span class="insert twitter">25 retweets</span>
  </button><br><br>
  <button class="sleeve">
    Google+
    <span class="insert google">25 pluses</span>
  </button>
  <br><br>
</center>

LIVE PREVIEW

See the Pen CSS Gallery - Slide Out Card Buttons by Peternak Blog (@peternakblog) on CodePen.

Credit: Jahdai Cintron
Powered by Blogger.