search

Home  >  Q&A  >  body text

font-family - 我引入CSS3自定义字体没有效果?

不知道为什么显示出来没效果?

求解答啊~~~~我弄了半天也没用

黄舟黄舟2863 days ago632

reply all(7)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 11:33:54

    If you write in CSS, then you should write the path relative to the CSS, not the page (otherwise, pages in different directories must not go crazy?)

    ../xxx.otf instead of xxx.otf

    reply
    0
  • PHPz

    PHPz2017-04-17 11:33:54

    The font path is a relative CSS path

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 11:33:54

    If you don’t want to specify a relative path, the font file needs to be placed in the same path as ccmain.css.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 11:33:54

    url../Return to the previous level and select the font file path. It is recommended to install plug-ins with recommended paths. On the one hand, it is efficient and on the other hand, it ensures correctness.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 11:33:54

    Font files and cascading style sheet files must be in the same folder.

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 11:33:54

    You have a fonts folder, why not put it in this folder, and then ../fonts maybe your path is wrong?

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 11:33:54

    Two problems
    1. Relative path error
    2. When specifying a font, the font type should be added at the end

    reply
    0
  • Cancelreply