【问题标题】:change cursor to pointer on the icon for bootstrap has feedback input将光标更改为引导图标上的指针有反馈输入
【发布时间】:2018-02-11 00:54:23
【问题描述】:

标题几乎说明了一切。当我将鼠标悬停在输入中的图标上时,我试图让光标成为一个指针。

这是小提琴。 http://jsfiddle.net/JfGVE/2758/

<div class=col-sm-4 style="padding-top: 50px;">
  <div class="form-group  has-feedback" style="pointer-events: initial !important;">
    <input type="text" style="pointer-events: initial !important;" class="form-control" ng-model="newItem">
    <span class="form-control-feedback" aria-hidden="true" style="cursor: pointer;">
                                    <i class="fa fa-plus fa-lg text-info" style="cursor: pointer;"></i>
                                </span>
  </div>
</div>

我什至无法让它与 jquery 一起使用

     $('.form-control-feedback').hover(function() {
            $(this).css('cursor','pointer');
        }

)

【问题讨论】:

    标签: jquery css twitter-bootstrap twitter-bootstrap-3


    【解决方案1】:

    您的样式表具有以下适用于包含图标的&lt;span&gt; 的规则:

    .form-control-feedback {
        /* ... */
        pointer-events: none;
    }
    

    您需要删除、修改或覆盖该规则才能更改光标。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-07
      • 2016-04-07
      • 2011-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-06
      • 2021-04-10
      相关资源
      最近更新 更多