gpt4 book ai didi

xml - XSL-FO 中的虚线下划线

转载 作者:行者123 更新时间:2023-12-05 09:01:46 25 4
gpt4 key购买 nike

我想使用 XSL-FO 为单词加点下划线。

我可以使用模板给单词加下划线,但不能用点划线。

这是我正在使用的模板:

<xsl:template match="db:link">
<fo:inline font-family="AvenirNextLTPro-It" text-decoration="underline">
<fo:basic-link internal-destination="{@idref}">
<xsl:apply-templates/>
</fo:basic-link>
</fo:inline>
</xsl:template>

这就是我如何将它应用到我的话中:

<link idref="policy">Policy</link>

在 XSL-FO 中是否有一个参数来制作虚线下划线?

最佳答案

text-decoration 支持的值不包括虚线的任何内容:

none | 
[ [ underline | no-underline] ||
[ overline | no-overline ] ||
[ line-through | no-line-through ] ||
[ blink | no-blink ] ] |
inherit

您可以通过 border-bottom-style 接近所需的效果:

<fo:inline font-family="AvenirNextLTPro-It" border-bottom-style="dotted">

旁注:请务必正确考虑命名空间——您的模板与 db:link 匹配,但您显示的示例是 link。根据播放中的默认命名空间和 db 命名空间前缀的定义,您可能也有一个匹配问题需要解决。

关于xml - XSL-FO 中的虚线下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72650871/

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