h1 {
text-align: center;
margin: auto;
box-shadow: 0 0 0 5px #1761A2;
border: dashed 3px #1761A2;
background: linear-gradient(#1761A2, #1761A2) no-repeat;
background-clip: border-box;
font-size: 2.5em;
text-shadow: 0 0 2px white, 0 0 2px white, 0 0 2px white, 0 0 2px white, 0 0 2px white;
font-size: 2.5em;
min-width: 12em;
}
body {
background: linear-gradient(to bottom left, yellow, gray, tomato, purple, lime, yellow, gray, tomato, purple, lime, yellow, gray, tomato, purple, lime);
height: 100vh;
margin: 0;
display: flex;
}
::first-line {
color: white;
text-transform: uppercase;
font-size: 0.7em;
text-shadow: 0 0
}
code {
color: tomato;
text-transform: uppercase;
text-shadow: 0 0;
}
em {
mix-blend-mode: screen;
text-shadow: 0 0 2px white, 0 0 2px white, 0 0 2px white, 0 0 2px white, 0 0 2px white
}
<h1>transparent dashed border<br/>
<em>with</em> <code>background-clip</code>
</h1>