Dotted text in css?

后端 未结 7 516
醉话见心
醉话见心 2021-02-01 02:34

Is it possible to make dotted text with css?

I know that the obvious thing would be to use a dotted font, but If I only need to use dotted text sparingly, then having th

7条回答
  •  佛祖请我去吃肉
    2021-02-01 03:06

    Change the background-size to use ems.

    For example:

    background-size: 0.1em 0.1em;
    

    NOTE: The above change sizes your first example with the font, but does not produce your second example. I would use inline SVG rather than a pure CSS approach if that exact effect is an absolute must. (Or the more obvious approach: change to a dotted font)

提交回复
热议问题