0

我写了一个合流宏。它使用速度来生成 html 表。如果我不在我的速度模型中使用<html>和标记,如何使用 css 设置此标记的样式。<head>我已尝试按照示例进行操作,但 id 不起作用(我的意思是它不起作用,并且没有我在宏的结果页面的代码中指定包含的 css 资源文件)

4

1 回答 1

1

如果我理解正确,
您需要将 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"/>
于 2011-12-22T13:11:21.250 回答