HTML:
<div class="labels">
<p>Very Funny</p>
</div>
CSS:
div.labels p {
background: red;
border-left: 2rem solid white;
border-right: 2rem solid white;
color: white;
font-family: 'Bebas Neue';
text-transform: uppercase;
line-height: 0.8;
transition: 0.4s ease all;
font-size: 4rem;
-webkit-text-stroke: 2px white;
letter-spacing: 2px;
width: fit-content;
padding: 1rem 2rem;
transform: skew(-10deg);
}
Here is the demo: https://jsfiddle.net/90vLp4ub/
You will notice that there is a thin red line around the element due to the background. How can I get rid of that?
Thanks.
To remove the red outlines and keep the animation, you can do this:
div.labels p:hover {
background: red !important;
margin-left: 30px;
}
div.labels p {
color: white;
font-family: 'Bebas Neue';
text-transform: uppercase;
line-height: 0.8;
transition: 0.4s ease all;
font-size: 4rem;
-webkit-text-stroke: 2px white;
letter-spacing: 2px;
width: fit-content;
padding: 1rem 2rem;
transform: skew(-10deg);
}
<div class="labels">
<p>Very Funny</p>
</div>