JSFiddle - React, Tailwind, and code Playground
by Dmitriy Shvanyk
HTML
<h1>
<span class="text-1">Text 1</span><br>
<span class="text-2">Text 2</span>
</h1>
CSS
* {
box-sizing: border-box;
}
body {
background: #000;
padding: 2rem;
}
h1 {
color: #fff;
font-size: 4rem;
position: relative;
display: inline-block;
}
h1:before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 200px;
height: 4px;
background: #00f;
transform: translate(-50%, -50%) rotate(-55deg);
z-index: 1;
}
.text-1,
.text-2 {
position: relative;
}
.text-1 {
z-index: 1;
}