gpt4 book ai didi

css - 如何使用 Diazo list 参数 (XSL) 设置背景色

转载 作者:太空宇宙 更新时间:2023-11-03 18:10:48 25 4
gpt4 key购买 nike

我需要使用 Diazo list 参数修改一些样式颜色。

我的想法是做这样的事情:

    <after css:theme-children="html body">
<style>
body {
background-color:<xsl:value-of select="$body_background_color" />;
}
</style>
</after>

返回此错误:

    runtime error, element 'variable' [190:0]
XSLT-variable: Redefinition of variable 'tag_text'. [0:0]

我可以在没有变量的情况下让它工作:

    <after css:theme-children="html body">
<style>
body {
background-color:red;
}
</style>
</after>

我可以在类似情况下使用该变量:

    <after css:theme-children="html body">
<div style="background-color:{$body_background_color};">
blah
</div>
</after>

但我不能把它们放在一起。

任何人都可以帮助解决错误或指出我的另一个解决方案吗?

最佳答案

我在 https://github.com/quintagroup/quintagroup.theme.sunrain/blob/master/quintagroup/theme/sunrain/static/tune.xml 的 Quintagroup 主题中找到了解决方案

<after theme-children="/html/head/style">
body {
background-color: <xsl:value-of select="$body_background_color" />;
}
</after>

这会将我的 css 代码添加到 header 中现有样式标记的末尾。

关于css - 如何使用 Diazo list 参数 (XSL) 设置背景色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23764728/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com