How to create a Label with close icon in Bootstrap?

前端 未结 4 1468
名媛妹妹
名媛妹妹 2021-02-01 02:57

With Bootstrap 3, what might be a good way of getting a bordered label with close icon? An example of the sort of thing from Stack Overflow:

4条回答
  •  别跟我提以往
    2021-02-01 03:30

    I ended up with http://jsfiddle.net/7zkCU/30/ (adapted from http://maxwells.github.io/bootstrap-tags.html):

    
      Example Tag
       
    
    

    CSS:

    .tag {
      font-size: 14px;
      padding: .3em .4em .4em;
      margin: 0 .1em;
    }
    .tag a {
      color: #bbb;
      cursor: pointer;
      opacity: 0.6;
    }
    .tag a:hover {
      opacity: 1.0
    }
    .tag .remove {
      vertical-align: bottom;
      top: 0;
    }
    .tag a {
      margin: 0 0 0 .3em;
    }
    .tag a .glyphicon-white {
      color: #fff;
      margin-bottom: 2px;
    }
    

提交回复
热议问题