markdown是否支持本机文本对齐而不使用html + css?


当前回答

原生markdown不支持没有HTML + css的文本对齐。

其他回答

在Github你需要写:

<p align="justify">
  Lorem ipsum
</p>

为了在md文件中居中文本,你可以使用center标签,如html标签:

<center>Centered text</center>

对于带有attr_list扩展名的python markdown,语法略有不同:

{: #someid .someclass somekey='some value' }

例子:

[Click here](http://exmaple.com){: .btn .btn-primary }

Lead information paragraph
{: .lead }

对于Markdown Extra,您可以使用自定义属性:

# Example text {style=text-align:center}

这适用于标题和块引号,但不适用于段落、内联元素和代码块。

更短的版本(但在HTML 5中不支持):

# Example text {align=center}

对于自述文件的Github使用div可以中心一切-

<div align="center">
    Any Text/Card/Item
</div>

但是这样使用p并不适用于所有item-

<p align="center">
    Any Text/Card/Item
</p>