I want to create a button with effect like button showing in this video. ” https://www.loom.com/share/2c536d14a94741068c2ff5f3e9b97040?sid=11865ac3-23fb-4da2-af97-e587d46ee564 “. When user hover on Join newsletter button then there is effect which i want to do.
As of now, i have created a codepan for this issue but still not getting final result.
button{
display: inline-block;
flex-direction: column;
margin: 10px;
padding: 10px;
background-color: #fdccaa;
border-radius: 8px;
text-align: center;
text-decoration: none;
color: black;
border: 1px solid black;
/* width: 50%;
transition: background-color 0.3s ease;
box-shadow: 20px 20px 2px 2px transparent, 3px 3px 1px #1b1a1a; */
line-height: 1.5 !important;
}
button:hover{
box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.2);
transform: translate(2px, 2px);
transition: transform 0.3s ease;
background: #fdccaa !important;
color: #000 !important;
}
<button>Join Newsletter</button>
Please check my fiddle and let me know what i am missing.
Zain abbas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.