Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 在svg中的样式标记上添加多个google字体_Css_Svg_Fonts_Google Font Api - Fatal编程技术网

Css 在svg中的样式标记上添加多个google字体

Css 在svg中的样式标记上添加多个google字体,css,svg,fonts,google-font-api,Css,Svg,Fonts,Google Font Api,我使svg包含一些文本,我想使用谷歌字体作为该文本的字体系列。有多个文本,我想在样式表中使用多个谷歌字体URL 我试着用我的方法,但不起作用。我的样式表 <style type="text/css"> @font-face { font-family: 'Freckle Face'; src: url('http://fonts.googleapis.com/css?family=Freckle Face') format('sv

我使svg包含一些文本,我想使用谷歌字体作为该文本的字体系列。有多个文本,我想在样式表中使用多个谷歌字体URL

我试着用我的方法,但不起作用。我的样式表

<style type="text/css"> 
      @font-face {
          font-family: 'Freckle Face';
          src: url('http://fonts.googleapis.com/css?family=Freckle Face') format('svg')
      }
</style>

@字体{
字体系列:“雀斑脸”;
src:url('http://fonts.googleapis.com/css?family=Freckle “面”)格式(“svg”)
}

我尝试了很多,但没有成功。请帮助我,并提前感谢

对不起,朋友们打扰了你。我找到了解决办法

样式表

<style xmlns="http://www.w3.org/2000/svg" type="text/css">
  @import url('http://fonts.googleapis.com/css?family=Audiowide');
  @import url('http://fonts.googleapis.com/css?family=Roboto'); 
</style>

@导入url('http://fonts.googleapis.com/css?family=Audiowide');
@导入url('http://fonts.googleapis.com/css?family=Roboto'); 

只需导入URL

实际上,您只需使用
@import-URL即可(http://fonts.googleapis.com/css?family=Audiowide|机器人)