6
A
回答
5
可以将该表创建为可缩放矢量图形(SVG)对象,并将其作为外部图像包含在XSL-FO文档中。 SVG支持圆角,而FOP支持SVG。
我相信你也可以创建一个圆角矩形SVG,并将它用作你的内容的背景,并把它放在它的前面。我想我做了一次,但我似乎无法找到代码...
0
只要它是固定的宽度,不要期望的东西'动态'像css动态宽度智慧,我已经做到了这一点(由使用垂直'滑动门'技术,如果你还记得老派的CSS):
获得一个圆角的背景图像,只要你期望在页面上就可以了(注意,如果你期望的东西上多个页面,那么这将不会工作得那么好)。我用它在页眉/页脚和开始一个新页面的东西(在身体区域),我知道不会超过1页。
于是我决定,如果我需要一个固定的高度......如果是这样,你可以只使用一个背景图片,没有fancyness ...
如果高度将发生变化,那么我只是用图像的顶部一部分和另一部分图像的底部。这样的事情:
<fo:block-container>
<fo:block-container background-image="url(images/rounded_corner_image.png)"
background-repeat="no-repeat"
background-position-horizontal="15px"
background-position-vertical="top"
background-color="white"
>
<!--
So it used the top of the image for as long as the block-container exists heightwise.
I may have had some whitespace in my image and need to move image into place so think I used background-position-horizontal since i had 15px of whitespace i wanted to cut off
Also you may set a height above if definatley know you don't need it to 'auto-expand', just make sure you have content that can't overflow if setting height (like a table with Name: Address: fields)
-->
<fo:block margin="70px 70px 0px 70px">
Need to add some margins before starting content since dont want to text to touch the top and sides of of the rounded corner/borders plus add whitespace for content.
</fo:block>
</fo:block-container>
<fo:block-container background-image="url(images/rounded_corner_image.png)"
background-repeat="no-repeat"
background-position-horizontal="15px"
background-position-vertical="bottom"
padding="0px 0px 20px 0px"
background-color="white"
>
<fo:block margin="0px 70px 70px 70px">
Need to add some margins before starting content since dont want to text to touch bottom and sides of of the rounded corner/borders.
</fo:block>
</fo:block-container>
</fo:block-container>
Theres各种方式去它我认为。就像我有内容在底部,所以我只是使用底部知道我肯定会有至少70px的内容来显示我的圆角的底部渐变....你可能会决定把所有的内容放在第一个块容器,并给第二个块容器固定的高度为70px,只显示底部背景图像(我认为这是可能的,即使没有内容存在于底部容器[忘记xsl-fo规则])。使用FOP中继并很好地工作。
编辑:我应该注意我使用最新的FOP 1.0(也尝试过prev版本),它运作良好。此外,我使用的图形与内容一样高,因为我具有边框......如果您只需要顶部和底部图形(并使用背景色填充主体,则不需要完整的'as-tall-as - 可能'图像)。
0
相关问题
- 1. 圆角圆角?
- 2. 表中的圆角
- 3. bxSlider中的圆角
- 4. 表中的圆角
- 5. HTML中的圆角
- 6. 圆角中的UIImageView
- 7. 圆角DataGrid角?
- 8. 圆角在IE中不是圆整的
- 9. SVG中的三角形上的圆角
- 10. 圆角的UIBarButtonItems
- 11. CGRectAddArc的圆角
- 12. NSTableView的圆角
- 13. 角上的圆
- 14. 的JTextArea圆角
- 15. UITableView的圆角
- 16. 圆角
- 17. 圆角
- 18. 圆角
- 19. 圆角
- 20. 圆角
- 21. 圆角
- 22. 在xslfo中修改行高
- 23. 圆角矩形工具和Photoshop中的比例圆角半径
- 24. 三角JS中的圆角平面
- 25. kivy中的圆角按钮角落
- 26. Android中的TABS圆角
- 27. IE8中的圆角边缘
- 28. IE8中的CSS圆角
- 29. TikZ树中的圆角
- 30. Silverlight中网格的圆角