Dotted text in css?

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

    Couldn't you just use the webfont Kit for this font?

    http://www.fontsquirrel.com/fonts/BPdots?q%5Bterm%5D=dot&q%5Bsearch_check%5D=Y

    You would simply link your CSS like so for the font-type you would like:

    @font-face {
        font-family: 'bpdotsbold';
        src: url('BPdotsBold-webfont.eot');
        src: url('BPdotsBold-webfont.eot?#iefix') format('embedded-opentype'),
             url('BPdotsBold-webfont.woff') format('woff'),
             url('BPdotsBold-webfont.ttf') format('truetype'),
             url('BPdotsBold-webfont.svg#bpdotsbold') format('svg');
        font-weight: normal;
        font-style: normal;
    
    }
    

    Then just link whatever element you would to use this font:

    h1{font-family: 'bpdotsbold', arial, helvetica;font-size:80px}
    

    Just be sure to upload the webfonts' path to your server and update each url('LINKTOFONT') in your CSS.

    There were several other Dot like fonts that font-squirrel has to offer:

    http://www.fontsquirrel.com/fonts/list/find_fonts?q%5Bterm%5D=dot&q%5Bsearch_check%5D=Y

提交回复
热议问题