我有一张桌子:
| This | Is | A | Table | | :--- | -- | - | ----: | | foo | ba | r | elbaT |
我希望表格显示在我的Markdown文件的中心而不是左对齐.我不是要对齐文本,而是整个表本身.我是否需要求助于HTML/CSS来实现我想要的目标?
这是一个Apiary.io项目.
如果您使用标准文档,请使用这样的<center>
标记.
FORMAT: 1A HOST: http://www.google.com # Tables Notes API is a *short texts saving* service similar to its physical paper presence on your table. <center> | Tables | Are | Cool | |----------|:-------------:|------:| | col 1 is | left-aligned | $1600 | | col 2 is | centered | $12 | | col 3 is | right-aligned | $1 | </center> # Group Notes (...)
如果使用" 新文档 ",则无法使表居中(因为表格占据了列的整个宽度).
是。您可以在API蓝图中拥有GFM表-检查http://docs.tables.apiary.io以获取以下蓝图源的渲染版本。
FORMAT: 1A # Tables API Note: Tables can be handcrafted or generated at <http://www.tablesgenerator.com/markdown_tables>. ## Table 1 **Discussion option 1** | Tables | Are | Cool | |----------|:-------------:|------:| | col 1 is | left-aligned | $1600 | | col 2 is | centered | $12 | | col 3 is | right-aligned | $1 | # Message [/pages] ## Create a Message [POST] ### Table 2 **Discussion option 2** | Tables | Are | Cool | |----------|:-------------:|------:| | col 1 is | left-aligned | $1600 | | col 2 is | centered | $12 | | col 3 is | right-aligned | $1 | + Request (application/json) ## Table 3 **Discussion option 3** | Tables | Are | Cool | |----------|:-------------:|------:| | col 1 is | left-aligned | $1600 | | col 2 is | centered | $12 | | col 3 is | right-aligned | $1 | + Headers Authorization:Bearer tokenString + Body { ... } + Response 201
我的解决方案由Gaffney在Apiary.io问题评论中详述.
基本上我在apiary.apib HTML块中添加自定义样式表和脚本来使用HTML设置页面样式,而不是标记Markdown di ale ct不是CSS.
还有"如何在CSS中居中".