如何创建指向readme.md文件指定部分的链接?

问题描述

我正在练习自述文件,但对链接有疑问。是否可以链接到自述文件的特定部分?例如,我想创建一个目录,并带有指向我的readme.md文件特定部分的链接。

# Title
## Sub Title
Brief description of project.

### Table of Content
* [Section 1](#section1)
* [Section 2](#section2)
* [Section 3](#section3)

# Section 1
some text

# Section 2
some text

# Section 3
some text

根据我的理解,我认为这可以解决问题,但这些链接并未将我带到这些部分,当我单击它们时,它们什么也没做。

解决方法

您将锚点添加到该部分,即

#<a name="section-1"></a> Section 1

然后使用

链接
[Section 1](#section-1)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...