我写了一个合流宏。它使用 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/