xx0219
V2EX  ›  问与答

发现个极品 代码高亮博客.. 谁分析下实现方法

  •  
  •   xx0219 · Feb 10, 2017 · 2106 views
    This topic created in 3388 days ago, the information mentioned may be changed or developed.

    想不通.... 求大家分析分析.... 能实现类似高亮就行....

    https://www.w3ctrain.com/2016/08/18/why-am-i-use-sass/
    它的是 div → figure → tbody → tr .... 这么多层. 怎么看都不像博客啊.
    博客的 md 解析器.. 怎么可能给你套上那么多层标签呢....

    下面是我 md 文件.代码块 的高亮. 我的是 div → pre →code

    4 replies    2017-02-22 19:58:29 +08:00
    helkylefighting
        1
    helkylefighting  
       Feb 10, 2017
    语法高亮用的是 highlight.js ( https://highlightjs.org/
    我只是在外层加多一个仿 mac 的框框。
    xx0219
        2
    xx0219  
    OP
       Feb 10, 2017
    @helkylefighting 这都能遇到本人你啊... 世界好小哈... 我研究研究 说不准还得请教你...
    Athrob
        3
    Athrob  
       Feb 10, 2017
    @xx0219 #2 哈哈
    helkylefighting
        4
    helkylefighting  
       Feb 22, 2017
    @xx0219 专门注册个账号来答复。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3011 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 10:55 · PVG 18:55 · LAX 03:55 · JFK 06:55
    ♥ Do have faith in what you're doing.