Xslt how to style conditional odd/even rows

前端 未结 3 1572
梦谈多话
梦谈多话 2021-02-08 22:39

I\'ve an html table written using xslt transformation that looks like this


        

        
      
      
      
3条回答
  •  半阙折子戏
    2021-02-08 23:26

    You could probably get away with doing this in just css

    tr:nth-child(odd) {
        /*...*/
    }
    tr:nth-child(odd) {
        /*...*/
    }
    

    If you cannot, you could do something like

    
        
            
                evenRow
            
            
                oddRow
            
        
    
    

    Note that i wrote this in the SO textbox and haven't tested it.

提交回复
热议问题