Wrapping character “Y” in span, increases the margin to next character

前端 未结 3 1186
北海茫月
北海茫月 2021-01-18 00:10

In my current project, I need to wrap every single character of a sentence within a span, so I can measure the distance from the beginning of the sentence up until the chara

3条回答
  •  醉梦人生
    2021-01-18 00:36

    You can solve that with setting font-kerning:none; to the div

    Like this

    div { font-size: 100px; font-kerning: none; }
    

    https://developer.mozilla.org/en-US/docs/Web/CSS/font-kerning

提交回复
热议问题