Disable a link in Bootstrap

前端 未结 6 1660
挽巷
挽巷 2021-02-03 16:40

The first example didn\'t work. I need to have always a list to disable links? Or what is wrong with my first demo?

Disabl         


        
6条回答
  •  春和景丽
    2021-02-03 17:07

    It seems that Bootstrap doesn't support disabled links. Instead of trying to add a Bootstrap class, you could add a class by your own and add some styling to it, just like this:

    a.disabled {
      /* Make the disabled links grayish*/
      color: gray;
      /* And disable the pointer events */
      pointer-events: none;
    }
    
    Link to disable
    Non-disabled Link

提交回复
热议问题