css - 在 confluence 4.0 中使用 css 样式化速度标记

标签 css velocity confluence

我写了一个合流宏。它使用 velocity 来生成 html 表。如果我不使用 <html>,如何使用 css 设置此标记的样式?和 <head>我的速度模型中的标签。我试过在this中那样做example but id doesn't work(我的意思是它没有效果,并且没有我指定包含在宏结果页面代码中的css资源文件)

最佳答案

如果我没理解错的话
例如,你需要在你的 css 文件上添加链接到 atlasian-plugin.xml

<atlassian-plugin name='Just name' key='com.your.path.to.lib'
              plugins-version="2">
 <resource type="download" name="style.css" location="css/style.css">
        <property key="content-type" value="text/css"/>
    </resource>
</atlassian-plugin>

之后您需要将此链接添加到您的速度模板的顶部

<link rel="stylesheet" href="$req.contextPath/com.your.path.to.lib/style.css"
      type="text/css"/>

关于css - 在 confluence 4.0 中使用 css 样式化速度标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8524334/

相关文章:

css - 替代不存在的网格间隙 : minmax() and padding> minmax()?

css - div 表格行为

php - 正则表达式从 css 文件中删除行

java - 获取包含 "&"特殊字符的数据时遇到问题

java - 如何在 JAVA 中使用 JSON 对象填充速度字符串?

html - 带有不透明度的包装器并在没有不透明度的情况下在此包装器上设置 div

database - 致命 : invalid value for parameter "TimeZone": "Australia/Canberra"

confluence - 全局统计总页数

asp.net - 我需要 VM 才能在 Windows Azure 上运行 Jira 吗?

java - 错误 org.apache.velocity : ResourceManager : unable to find resource 'xxx.html.vm' in any resource loader