markdown折叠展开代码

背景

有的时候,我们的代码太多,直接用cout<<"hello";很不方便。
我们可以将代码折叠。

效果

20190508215442216.gif

代码

普通代码折叠
<details>
<summary>展开查看代码</summary>
<pre><code>
System.out.println("Hello to see U!");
</code></pre>
</details>
html代码折叠
<details>
<summary>展开查看</summary>
<xmp>
<h1>hello</h1>
<h2>hello</h2>
</xmp>
</details>

提示

csdn的markdown解析器好像是自己写的,并不支持这种形式。希望CSDN可以解决这种问题。

发布了109 篇原创文章 · 获赞 51 · 访问量 9万+

猜你喜欢

转载自blog.csdn.net/NetRookieX/article/details/104410739