How to use CSS in Markdown?

后端 未结 3 1597
野性不改
野性不改 2021-02-01 03:28

I want to use a CSS class in a Markdown file.

For instance, (from fontawesome) should be displayed as

3条回答
  •  孤街浪徒
    2021-02-01 04:19

    The simplest way to add custom css styles is to use Pandoc attributes syntax (which can convert Markdown to html, pdf, pppt and more)

    Heading Identifiers:
    ### Red text title {#identifier .red}
    
    Fenced Code Attributes:
    {.red .numberLines startFrom="1"}
    
    Inline Code Attributes:
    `red text`{.red}
    
    Bracketed Spans:
    [This is *some red text*]{.red}
    
    Link Attributes:
    ![alt text](the.jpg){.center}
    

提交回复
热议问题