如何解决在 Github Flavored Markdown 中水平居中表格
我有一个用 github flavored markdown 编写的表格。它在 Github 自述文件中用于存储库。
我需要将表格水平居中,我尝试在几个标签(也有父标签)中定义 align 属性,但这似乎对对齐没有任何影响。
这是我使用的代码:
<h1 align="center">
<br>
<table align="center">
<tr><td>
<img src="./res/logo_static.png" width="200" alt="Pastemyst.Pas">
</td></tr>
</table>
</h1>
logo_static 是我保存在同一目录中的图像,也忽略使用的替代名称。
解决方法
.center {
margin-left: auto;
margin-right: auto;
}
<table class="center">
<tr>
<td><img src="https://via.placeholder.com/150"></td>
</tr>
</table>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。