向Markdown元素添加ID或类 [英] Add ID or Class to Markdown-element
本文介绍了向Markdown元素添加ID或类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以向(multi)markdown元素添加ID或类?
Is it possible to add an id or class to a (multi)markdown element?
例如表,代码段或代码块?
For example a table, a paragraph or block of code?
我想用css样式化表,但没有以下工作:
I would like to style a table with css but non of following work:
[captionid][This is the caption, not the table id]
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
[captionid][This is the caption, not the table id]
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
[tablecaption](#tableid)
<div class="special_table">
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
</div>
在网上找不到其他东西.
Can't find anything else online..
我不是说github或stackoverflow风格的markdown顺便说一句.
I dont mean github or stackoverflow flavored markdown btw.
推荐答案
我可以确认可以与 kramdown 一起使用.狩猎愉快.
I can confirm this to work with kramdown. Happy hunting.
降价
{:.foo}
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
css
.foo {
background: blue;
}
这篇关于向Markdown元素添加ID或类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文