【问题标题】:include svg within mustache file在 mustache 文件中包含 svg
【发布时间】:2015-05-13 09:00:28
【问题描述】:

我有以下来自 patternlab 模板的 mustache 文件,我想包含一个 svg 文件,它是另一个文件夹,我的 mustache 文件到目前为止看起来像这样,我只想在 body 标签之后包含它

<!DOCTYPE html>
<html class="{{ htmlClass }}">
    <head>
        <title>{{ title }}</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width" />

        <link rel="stylesheet" href="../../css/style.css?{{ cacheBuster }}" media="all" />
        <link href="../../fonts/fonts.css" type="text/css" charset="utf-8" rel="stylesheet"  />
        <!-- Begin Pattern Lab (Required for Pattern Lab to run properly) -->
        {% pattern-lab-head %}
        <!-- End Pattern Lab -->

    </head>
    <body class="{{ bodyClass }}">  

我知道在 PHP 中你可以做到这一点,但小胡子怎么办?谢谢

【问题讨论】:

    标签: mustache


    【解决方案1】:

    您必须在单独的 mustache 文件中编写 svg 实现的代码。比您可以轻松地使用 {{> folder/svg-file-name }}

    包含胡子文件

    【讨论】:

      猜你喜欢
      • 2010-10-13
      • 2016-07-13
      • 2020-01-21
      • 2014-03-21
      • 1970-01-01
      • 2011-07-19
      • 1970-01-01
      • 2013-06-21
      • 2021-12-07
      相关资源
      最近更新 更多