【问题标题】:Moovweb: specify assets in images/folder via html?Moovweb:通过html指定图像/文件夹中的资产?
【发布时间】:2014-02-11 16:53:47
【问题描述】:

我知道可以使用氚来引用图像文件夹的内容。然而,我正在使用 read() 函数来引入一个 html sn-p。有没有办法通过那个 html sn-p 指定图像? 例如:

<img src='/moovweb_local_assets_/images/Logo150.png">' alt="1" /> 

【问题讨论】:

    标签: moovweb


    【解决方案1】:

    我不知道这一点,但我可以给你一些技巧。 将任何类或 id 添加到此 img 标记,并在 tritium 的帮助下添加 src 属性及其 url。例如,

    html:

    <img id="myImage" alt="1" /> 
    

    氚:

    $$("#myImage"){
       attribute('src',asset('images/Logo150.png'));
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-23
      相关资源
      最近更新 更多