2

似乎该provisional-label-separation属性根本不会影响间距。我也尝试过margin-*, padding-*, space-before,space-after但是列表项之间的空间仍然不会改变。如何在这样的列表中更改列表项之间的垂直空间(我正在渲染为 PDF,如果这有所不同)?

<fo:list-block provisional-distance-between-starts="3mm" 
               provisional-label-separation="3mm" 
               space-after="3mm" >

    <fo:list-item>
        <fo:list-item-label end-indent="label-end()">
            <fo:block>&#x2022;</fo:block>
        </fo:list-item-label>
        <fo:list-item-body start-indent="body-start()" font-size="9pt">
            <fo:block>Day care or nanny expenses</fo:block>
        </fo:list-item-body>
    </fo:list-item>

    <fo:list-item>
        <fo:list-item-label end-indent="label-end()">
            <fo:block>&#x2022;</fo:block>
        </fo:list-item-label>
        <fo:list-item-body start-indent="body-start()" font-size="9pt">
            <fo:block>Field trips</fo:block>
        </fo:list-item-body>
    </fo:list-item>

    <fo:list-item>
        <fo:list-item-label end-indent="label-end()">
            <fo:block>&#x2022;</fo:block>
        </fo:list-item-label>
        <fo:list-item-body start-indent="body-start()" font-size="9pt">
            <fo:block>School supplies</fo:block>
        </fo:list-item-body>
    </fo:list-item>

    <fo:list-item>
        <fo:list-item-label end-indent="label-end()">
            <fo:block>&#x2022;</fo:block>
        </fo:list-item-label>
        <fo:list-item-body start-indent="body-start()" font-size="9pt">
            <fo:block>Music lessons and other extracurricular activities</fo:block>
        </fo:list-item-body>
    </fo:list-item>

</fo:list-block>
4

1 回答 1

9

要更改列表项之间的垂直空间,请在列表项上使用space-after(或可能space-before):

<fo:list-item space-after="5mm">
  <fo:list-item-label end-indent="label-end()">
     <fo:block>&#x2022;</fo:block>
  </fo:list-item-label>
  <fo:list-item-body start-indent="body-start()" font-size="9pt">
       <fo:block>Day care or nanny expenses</fo:block>
  </fo:list-item-body>
</fo:list-item>

provisional-label-separation指定 list-item-label 的结尾和 list-item-body 的开头之间的临时距离(即,它是水平距离)。请参阅http://www.w3.org/TR/xsl/#d0e12377

于 2013-08-06T18:20:13.247 回答