1

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

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

1 回答 1

1

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

html:

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

氚:

$$("#myImage"){
   attribute('src',asset('images/Logo150.png'));
}
于 2014-02-11T08:53:47.727 回答