【问题标题】:How to put the x inside text field?如何将 x 放在文本字段中?
【发布时间】:2018-06-06 01:16:30
【问题描述】:

我试图将可点击时间(x)从字体 Awesome 放入文本字​​段中,但我也无法做到,因为所有类都缺乏文档...... 这里是我所拥有的链接

  <input type="text" class="form-control" id="copy-text">
  <span>
        <i class="fa fa-times xicon" aria-hidden="true"></i>
      </span>

  <span class="input-group-btn">

        <button id="copy-emoji" data-clear-btn="true" class="form-control btn-large btn-lg btn btn-success" type="button" onclick="copyall()">COPY</button>

      </span>
</div>

https://jsfiddle.net/2Lm6fup1/

谢谢

【问题讨论】:

标签: css twitter-bootstrap


【解决方案1】:

您可以相对于.input-group 定位图标。

.xicon.over {
    position: relative;
    top: 11px;
    left: -24px;
    width: 0;
    z-index: 999;
    cursor: pointer;
}

https://jsfiddle.net/2Lm6fup1/5/

【讨论】:

  • 为什么要添加类.over?
猜你喜欢
  • 2012-11-15
  • 2017-11-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-09-14
  • 1970-01-01
  • 2021-08-03
  • 1970-01-01
相关资源
最近更新 更多