<script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.esm.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.js"></script>
<div class="multi-button">
<button class="first">
<span>Cut</span>
<ion-icon name="cut"></ion-icon>
</button>
<button class="second">
<span>Copy</span>
<ion-icon name="copy"></ion-icon>
</button>
<button class="third">
<span>Paste</span>
<ion-icon name="document"></ion-icon>
</button>
</div>
body {
height: 100vh;
margin: 0;
display: grid;
place-items: center;
background:white;
}
.multi-button{
border-radius:30px;
background:#7A49C7;
}
.first{
border-radius:30px 0px 0px 30px;
}
.third{
border-radius:0px 30px 30px 0px;
}
button {
background-color: #000000;
border-radius: 5px;
color: #ffffff;
cursor: pointer;
padding: 10px 40px;
display: inline-block;
text-transform: uppercase;
outline: none;
position: relative;
opacity: 1;
-webkit-transition: all 0.3s;
transition: all 0.3s;
cursor:pointer;
background:#7A49C7;
text-align:center;
border: none;
margin: 0;
padding: 17px;
width:130px;
font-size: 13px;
}
button span {
display: inline-block;
-webkit-transition: all 0.3s;
transition: all 0.3s;
-webkit-transition-delay: 0.3s;
transition-delay: 0.3s;
}
button ion-icon {
font-size: 25px;
text-align: center;
width: 100%;
top: 50%;
left: 0;
display: block;
position: absolute;
opacity: 0;
-webkit-transform: translate(0, -50%);
transform: translate(0, -50%);
-webkit-transition: all 0.3s;
transition: all 0.3s;
-webkit-transition-delay: 0s;
transition-delay: 0s;
}
button:before {
content: '';
top: 0;
left: 50%;
right: 50%;
position: absolute;
height: 100%;
background: rgba(255, 255, 255, 0.15);
-webkit-transition: all 0.3s;
transition: all 0.3s;
-webkit-transition-delay: 0.15s;
transition-delay: 0.15s;
}
button:hover span,
button.hover span {
opacity: 0;
-webkit-transition-delay: 0s;
transition-delay: 0s;
}
button:hover ion-icon,
button.hover ion-icon {
opacity: 1;
-webkit-transition-delay: 0.2s;
transition-delay: 0.2s;
}
button:hover:before,
button.hover:before {
left: 0;
right: 0;
-webkit-transition-delay: 0s;
transition-delay: 0s;
}
$("button").mouseleave(
function() {
$(this).removeClass("hover");
}
);
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.