Answers for "css animated button"

CSS
0

css animated button

/*
Try this code by yourself
HTML Layout
<button>
  login
  <span></span>
</button>
*/
/* Custom Design our button*/
button{
  padding: 10px;
  background-color: #f00;
  width: 120px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}
button > span{
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: #00f;
  transition: .3s ease-in-out;
}
button:hover > span{
  width: 100%;
}
Posted by: Guest on June-17-2021

Browse Popular Code Answers by Language