首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >XSL-FO:星号的边框

XSL-FO:星号的边框
EN

Stack Overflow用户
提问于 2014-05-27 10:17:39
回答 1查看 148关注 0票数 0

在XSL-FO中,可以使fo:块具有一个可以是实心或虚线的边框,等等。是否可以生成由星号(*)组成的边框?

代码语言:javascript
复制
*****************
*               *
*  some text    *
*               *
*****************
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-05-27 23:51:07

我一直这样做的SVG图像作为背景。你可以改变角落,侧面,顶部和底部的图像。基本上,在中间单元格的边框里放一张桌子,然后放在中间的单元格里,随你的意愿。如果您的模式可能被切断,您可能需要调整内部单元格一点。如下所示:

代码语言:javascript
复制
            <fo:table>
                <fo:table-column column-width="1pt"/>
                <fo:table-column/>
                <fo:table-column column-width="1pt"/>
                <fo:table-body>
                    <!-- Put background behind this top row -->
                    <fo:table-row background-image="diamond.svg"
                        rx:background-content-height="scale-to-fit" background-repeat="repeat-x">
                        <fo:table-cell number-columns-spanned="3">
                            <fo:block line-height="1pt">
                                <fo:leader/>
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                    <fo:table-row>
                        <!-- Put backround behind this left cell -->
                        <fo:table-cell background-image="diamond.svg"
                            rx:background-content-width="scale-to-fit"
                            background-repeat="repeat-y">
                            <fo:block>
                                <fo:leader/>
                            </fo:block>
                        </fo:table-cell>
                        <fo:table-cell>
                            <!-- Tweak height here -->
                            <fo:block-container margin-top="0.4pt" margin-bottom="0.4pt">
                                <fo:table text-align="center">
                                    <fo:table-column column-width="100%"/>
                                    <fo:table-body>
                                        <fo:table-row>
                                            <fo:table-cell text-align="center">
                                            <fo:block margin="18pt"> Put all your content in
                                            here. Put all your content in here. Put all your
                                            content in here. Put all your content in here. Put
                                            all your content in here. Put all your content in
                                            here. Put all your content in here. Put all your
                                            content in here. Put all your content in here. Put
                                            all your content in here. Put all your content in
                                            here. Put all your content in here. Put all your
                                            content in here. Put all your content in here. Put
                                            all your content in here. Put all your content in
                                            here. Put all your content in here. Put all your
                                            content in here. Put all your content in here. Put
                                            all your content in here. Put all your content in
                                            here. Put all your content in here. Put all your
                                            content in here. Put all your content in here. Put
                                            all your content in here. Put all your content in
                                            here. Put all your content in here. Put all your
                                            content in here. Put all your content in here. Put
                                            all your content in here. Put all your content in
                                            here. Put all your content in here. Put all your
                                            content in here. Put all your content in here.
                                            </fo:block>
                                            </fo:table-cell>
                                        </fo:table-row>
                                    </fo:table-body>
                                </fo:table>
                            </fo:block-container>
                        </fo:table-cell>
                        <!-- Put backround behind this right cell -->
                        <fo:table-cell background-image="diamond.svg"
                            rx:background-content-width="scale-to-fit"
                            background-repeat="repeat-y">
                            <fo:block>
                                <fo:leader/>
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                    <!-- Put background behind this bottom row -->
                    <fo:table-row background-image="diamond.svg"
                        rx:background-content-height="scale-to-fit" background-repeat="repeat-x">
                        <fo:table-cell number-columns-spanned="3">
                            <fo:block line-height="1pt">
                                <fo:leader/>
                            </fo:block>
                        </fo:table-cell>
                    </fo:table-row>
                </fo:table-body>
            </fo:table>

产生这样的东西:

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23886809

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档