Dotted text in css?

后端 未结 7 486
醉话见心
醉话见心 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:30

    Even if it relies on SVG inline styles , here's what I came with:

    
    
       
                 Some dotted text
    
    

    although for some reasons the stroke-linecap isn't working..

    If you want to play with a working fiddle check this .

    EDIT-1 (moving svg-styles to CSS)

        svg{ 
            width:1450px;
            height:300;
            viewBox:0 0 1500 300;
          
        }
        text{
          font-family:'Lucida Grande', sans-serif;
          font-size:152px;
          stroke:#000ece;
          stroke-width:3px;
          stroke-linecap:round;
          stroke-dasharray:1,1;
          fill:none;
        
        }
    Some dotted text

提交回复
热议问题