<div class="centered">
<div class="container">
<div class="arrow">
<div class="filler"></div>
</div>
<div class="content">
<p>EXIT</p>
</div>
</div>
</div>
html,
body {
width: 100%;
height: 100%;
}
.centered {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: black;
}
.container {
width: 300px;
height: 150px;
position: relative;
clip-path: polygon(
0% 20%,
60% 20%,
60% 0%,
100% 50%,
60% 100%,
60% 80%,
0% 80%
);
}
.container:hover .arrow {
padding-left: 100%;
}
.container:hover .content p {
color: darkcyan;
}
.arrow {
background-color: cyan;
width: 100%;
height: 100%;
padding-left: 0px;
transition: all 0.5s;
}
.filler {
background-color: darkcyan;
width: 100%;
height: 100%;
}
.content {
width: 100%;
height: 100%;
position: absolute;
top: 0;
right: 18px;
display: flex;
justify-content: center;
align-items: center;
background-color: transparent;
}
.content p {
transition: color 0.6s;
color: cyan;
font-family: sans-serif;
font-size: 60px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.