CSS

【CSS】FontAwesomeを使用したCSS3ボタンホバーエフェクトCSS3 Button Hover Effects

April 5, 2017
CSS3 Button Hover Effects

CSS3 Button Hover EffectsはFontAwesomeを使用したCSS3ボタンホバーエフェクト。

CSS

.effect {
  display: inline-block;
  position: relative;
  text-decoration: none;
  color: #fff;
  text-transform: capitalize;
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  padding: 20px 0px;
  width: 150px;
  border-radius: 6px;
  overflow: hidden;
}

.effect.effect-1 {
  -webkit-transition: all 0.2s linear 0s;
  transition: all 0.2s linear 0s;
}
.effect.effect-1:after {
  content: "\f178";
  font-family: FontAwesome;
  font-size: 15px;
  position: absolute;
  right: 11px;
  top: 22px;
  opacity: 0;
  -webkit-transition: all 0.2s linear 0s;
  transition: all 0.2s linear 0s;
  text-align: right;
}
.effect.effect-1:hover {
  text-indent: -20px;
}
.effect.effect-1:hover:after {
  opacity: 1;
}

HTML

Effect #1

  <div class="button-effect">
    <h2>Effect #1</h2>
    <a class="effect effect-1" href="#" title="Learn More">Learn More</a>
    <a class="effect effect-1" href="#" title="Learn More">Learn More</a>
    <a class="effect effect-1" href="#" title="Learn More">Learn More</a>
    <a class="effect effect-1" href="#" title="Learn More">Learn More</a>
    <a class="effect effect-1" href="#" title="Learn More">Learn More</a>
  </div>