erikjung
7/8/2012 - 7:10 AM

Button, -webkit-filter, and transitions

Button, -webkit-filter, and transitions

{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
<a class="button">But not for long</a>
<a class="button">I accept them terms</a>

/* Button, -webkit-filter, and transitions */

body {
  background: #555;
  font: 16px sans-serif;
}

.button {
  display: inline-block;
  padding: .5rem 2rem;
  margin-bottom: 0;
  font-size: 2rem;
  font-weight: bold;
  line-height: 3rem;
  color: #333;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  background-image: -webkit-linear-gradient(top, white, #E6E6E6);
  background-repeat: repeat-x;
  border-radius: .25em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05), 0 .5em .5em -.2em rgba(0,0,0,.1);
  -webkit-transition: all 500ms;
  
  position: absolute;
  width: 400px;
}

.button:hover {
  color: white;
  opacity: 0;
  -webkit-filter: blur(20px);
}

.button:first-child {
  color: white;
  background: none;
  box-shadow: none;
  -webkit-transition: none;
}