Sectioning different heading levels

前端 未结 1 706
孤街浪徒
孤街浪徒 2021-01-16 07:18

The goal is to group elements starting with different heading levels into sections nested according to those levels.

Problem is similar to XSLT: moving a grouping ht

1条回答
  •  离开以前
    2021-01-16 07:58

    I would simply let the function group by the current level and stop at the maximum level (which is 6 in HTML):

    
    
    
      
      
      
        
          
            

    Obviously the level to search for could be provided as a parameter instead of hardcoding it in the stylesheet:

    
    
    
    
    
    
    
    
    
      
      
      
        
          
            

    0 讨论(0)
提交回复
热议问题