@ Font-face无法在移动设备上运行

Ree*_*ece 11 html css font-face

这是我的代码,它在桌面和平板电脑上运行得非常好,但在移动设备上则不行.是代码还是某些字体不能在移动设备上运行

@font-face {
    font-family: 'Out';
    src: url('http://location/Outstanding.otf');
}
Run Code Online (Sandbox Code Playgroud)

Roy*_*Roy 14

你需要像这个例子一样添加font face所需的所有src:

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
       url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
       url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
Run Code Online (Sandbox Code Playgroud)

来源:https://css-tricks.com/snippets/css/using-font-face/
希望它有所帮助,干杯.

(如果你需要转换字体,你需要https://www.fontsquirrel.com/tools/webfont-generator)