2013-08-06 27 views
2

根本沒有出現provisional-label-separation屬性影響間距。我也嘗試過margin-*,padding-*,space-beforespace-after,但列表項之間的空間仍然不會改變。我怎樣才能改變這樣的列表中的列表項之間的垂直空間(如果這有所影響,我正在渲染爲PDF格式)?無法更改XSL-FO中的列表項之間的空格

<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> 
+0

你使用什麼FO處理器? – mzjn

+0

@mzjn我如何知道?我正在使用C#。 – user1477388

+0

@mzjn我在我的項目中參考了'fop',我相信這是格式化對象處理器。 – user1477388

回答

6

要更改列表項之間的垂直空間,在該列表項使用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指定列表的端部之間的臨時距離-item-label和list-item-body的開始(即,它是一個水平距離)。請參閱http://www.w3.org/TR/xsl/#d0e12377

+0

謝謝,幹得不錯。我以爲我嘗試過,但我想我沒有。 **注意:**這也是負利潤率除外。 – user1477388