I'm trying to implement a typography animation, and in that regard, I have all the characters of the text in a <span>
tag as shown below.
But, the output of the html is as shown in the image below, with extra spaces between my span elements. (Notice one extra element shown between each span)
.container {
max-width: 1200px;
margin: 0 auto;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.text {
font-size: 120px;
font-weight: 900;
}
<body>
<div class="container">
<div class="text">
<div class="text-row">
<span>W</span>
<span>e</span>
<span> </span>
<span>P</span>
<span>r</span>
<span>o</span>
<span>v</span>
<span>i</span>
<span>d</span>
<span>e</span>
</div>
</div>
</div>
</body>
Can anyone explain why is this happening?