字体大小/字体系列无效
这是与我之前的问题相关的问题。
我已经修改了前言标题建议的代码,以修改标题下方的 p 标签。
<xsl:template match="topic[title='Preface']/body/section/p">
<fo:block xsl:use-attribute-sets="preface.p">
<xsl:apply-imports/>
</fo:block>
</xsl:template>
<xsl:attribute-set name="preface.p">
<xsl:attribute name="font-family">Helvetica</xsl:attribute>
<xsl:attribute name="color">red</xsl:attribute>
<xsl:attribute name="font-size">8pt</xsl:attribute>
</xsl:attribute-set>
颜色改变了所需的文本 - 并且仅改变了所需的文本,所以我知道它正在抓取正确的节点。但是,字体系列和大小没有影响。
有谁知道我可以检查哪些可能会覆盖代码的内容?
This is a related issue to my previous question.
I have modified the code suggested for preface headings to modify the p tags underneath the headings.
<xsl:template match="topic[title='Preface']/body/section/p">
<fo:block xsl:use-attribute-sets="preface.p">
<xsl:apply-imports/>
</fo:block>
</xsl:template>
<xsl:attribute-set name="preface.p">
<xsl:attribute name="font-family">Helvetica</xsl:attribute>
<xsl:attribute name="color">red</xsl:attribute>
<xsl:attribute name="font-size">8pt</xsl:attribute>
</xsl:attribute-set>
The color changes the desired text - and only the desired text, so I know it is grabbing the correct nodes. However, the font family and size have no effect.
Does anyone know of anything I can check that might be over-riding the code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
HTML 没有属性
font-family
或font-size
,它们是 CSS 属性,试试这个:HTML doesn't have the attributes
font-family
orfont-size
, they are CSS properties, try this: