JSFiddle - React, Tailwind, and code Playground
by Ken Z
HTML
<div class="body">
<div class="first">
<button type="submit" id="type">Click Here!</button>
</div>
<div class="second">
<button type="submit" id="type1">Click Here!</button>
</div>
<div class="last">
<button type="submit" id="type2">Click Here!</button>
</div>
</div>
CSS
.first {
width: 100px;
height: 100px;
position: relative;
border:2px solid black;
}
.second {
width: 100px;
height: 100px;
position: relative;
border:2px solid black;
}
.last {
width: 100px;
height: 100px;
position: relative;
border:2px solid black;
}
#type {
border-radius:100%;
border: none;
width: 100px;
height: 100px;
background-color: #2EFEF7;
color:#FFFFFF;
position: absolute;
left: -4em;
transition:2s;
}
#type1 {
border-radius:15%;
border:none;
width: 100px;
height: 100px;
background-color: #01A9DB;
color:#FFFFFF;
position: absolute;
transition:2s;
left: -4em;
}
#type2 {
border:none;
width: 100px;
height: 100px;
background-color: #0404B4;
color:#FFFFFF;
position: absolute;
transition:2s;
left: -4em;
}
.first:hover #type {
transition:2s;
left:0;
}
.second:hover #type1 {
transition:2s;
left:0;
}
.last:hover #type2 {
transition:2s;
left:0;
}
.body {
width: 100%;
height: 100%;
}