Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

button slanted slide on hover

div {
  position: relative;
  display: inline-block;
  padding: 15px 70px;
  border: 5px solid #B17461;
  color: #B17461;
  font-size: 30px;
  font-family: arial;
  transition: color .5s;
  overflow:hidden;
}
div:before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 130%; height: 100%;
  background: #B17461;
  z-index: -1;
  transform-origin:0 0 ;
  transform:translateX(-100%) skewX(-45deg);
  transition: transform .5s;
}
div:hover {
  color: #fff;
}
div:hover:before {
  transform: translateX(0) skewX(-45deg);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #button #slanted #slide #hover
ADD COMMENT
Topic
Name
7+8 =