0

我很想知道我们如何使用FTL免费标记模板语言)放置图像?还有如何在FTL中更改字体颜色和样式?

any1 可以知道任何好的学习教程FTL吗?请分享链接...

4

3 回答 3

2

FTL 只是在服务器上生成文本,如 HTML、CSS 等,然后客户端(浏览器)只获取输出。因此,假设您使用 FTL 生成 HTML,您可以使用<img src="...">. 要了解 FreeMarker,当然可以访问http://freemarker.org/docs/index.html

于 2012-08-17T16:41:12.303 回答
1

就像您将图像放入 HTML 页面一样。

<image src="images/someFile.png" class="someClass "/>

FTL 是一种模板语言。因此所有基本语法和功能都与 html、jsp 或任何其他网页相同。

于 2012-09-01T06:51:34.183 回答
1

Freemarker 允许您像往常一样分配图像的 src:

<img src="yourPath/yourImage.png" alt="..." />

或类似的东西:

<#--Where "imgUrl" is where the URL for your image is stored, and "alt" is where the alt text of the image is stored.-->
<img src=${imgUrl} alt=${alt} />

第二个选项在处理列表时特别有用。

于 2017-06-15T20:33:31.343 回答