Specifying the styles for the selected tab in a navbar

前端 未结 2 1360
时光取名叫无心
时光取名叫无心 2020-12-11 22:03

I have the following html code



    
        

        
2条回答
  •  借酒劲吻你
    2020-12-11 22:20

    Combine css classes.

    HTML:

  • Home
  • Second page
  • Third page
  • CSS:

    .home.ui-btn-active {
        background:red !important;
    }
    .two.ui-btn-active {
        background:green !important;
    }
    .three.ui-btn-active {
        background:blue !important;
    }
    

    Updated Fiddle:

    http://jsfiddle.net/8pwFK/3/

提交回复
热议问题