在Bootstrap 3.0中禁用了list-group-item

Jua*_*dim 9 twitter-bootstrap twitter-bootstrap-3

我一直在使用bootstrap 3.0,我想知道如何禁用list-group-item.

我试过的是将禁用的属性放在"a"标签中,但这没有任何影响.我还尝试添加具有相同结果的禁用类.

这里有一些例子:

<div class="list-group">
  <a href="#" class="list-group-item">Add New entry</a>
  <a href="#" class="list-group-item disabled">Delete Entry</a>
</div>
Run Code Online (Sandbox Code Playgroud)

谢谢

Bas*_*sen 22

在Bootstrap中,有来自froms,navbars链接,nav链接,dropdownlinks的禁用状态.

我认为导航的禁用状态最适合您的情况:http://getbootstrap.com/components/#nav-disabled-links

复制列表组的此禁用状态:

减:

.list-group  > a.disabled  {
      color: @nav-disabled-link-color;

      &:hover,
      &:focus {
        color: @nav-disabled-link-hover-color;
        text-decoration: none;
        background-color: transparent;
        cursor: not-allowed;
      }
    }
Run Code Online (Sandbox Code Playgroud)

CSS:

.list-group > a.disabled {
  color: #999999;
}
.list-group > a.disabled:hover,
.list-group > a.disabled:focus {
  color: #999999;
  text-decoration: none;
  background-color: transparent;
  cursor: not-allowed;
}
Run Code Online (Sandbox Code Playgroud)

示例:http://bootply.com/88367