markdown 超链接居中

markdown本身不支持,但可以使用html

  • 法一(在csdn的markdown中<center>与前一个文字之间,可以只有空格但不能只有回车也不能只有回车+空格,否则超链接语法将会失效,其他地方的markdown有无此限制不清楚):
<center>
[链接名称](链接地址)
</center>
  • 法二:
<center>
<a href=链接地址>链接名称\</a>
</center>
  • 法三:
<div align=center >
<a href=链接地址>链接名称\</a>
</div>

例1:<center>
[我的博客](https://blog.csdn.net/weixin_42378324/article/details/108392847)
</center>


我的博客

例1中如果center例1: 中间夹一个回车,超链接语法就失效了,像这样:

[我的博客](https://blog.csdn.net/weixin_42378324/article/details/108392847)
◀例2:
<center>
<a href=https://blog.csdn.net/weixin_42378324/article/details/108392847>我的博客\</a>
</center>
我的博客
◀例3:
<div align=center >
<a href=https://blog.csdn.net/weixin_42378324/article/details/108392847>我的博客\</a>
</div>



猜你喜欢

转载自blog.csdn.net/weixin_42378324/article/details/108392847