如何将x放在文本字段中?

时间:2017-12-24 02:02:17

标签: css twitter-bootstrap

我试图在文本字段中放置来自字体Awesome的可点击时间(x)但是我不能这样做也缺少所有类的文档... 这里有我所拥有的链接

  <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/

谢谢

1 个答案:

答案 0 :(得分:1)

您可以将图标相对于.input-group

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

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