I am attempting to showcase a number on a background image. Currently, my setup looks like this:
body {
background-image: url("https://i.picsum.photos/id/10/800/800.jpg");
background-repeat: no-repeat;
background-position: center;
width: 400px;
height: 400px;
}
#age {
/* 1 pixel black shadow to left, top, right and bottom */
text-shadow: 2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff, 1px 1px #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
font-family: sans;
color: transparent;
font-size: 40vw;
}
<h1 id="age">27</h1>
While this setup is close to what I want, the number always appears with a white fill. What I aim for is to have the number displayed prominently, filled with transparency only, and enclosed in a white border. My ultimate goal is to create a counter effect where it visibly counts up to the specified number. However, for now, I simply need help displaying the number without the white fill.
Is there a way to achieve this and show only the white border while letting the background shine through the empty space?