删除字母间距后,仅输入6个字符用于输入字段

时间:2018-06-19 07:35:01

标签: javascript jquery html css internet-explorer

我推荐这篇文章How to partition input field to appear as separate input fields on screen?。它适用于所有浏览器。但即不适用于position:sticky。我可以使用的任何其他选项,在我的代码下面。

.otp_form_control {
  border-radius: 0;
  border: 0;
  outline: 0;
  background-color: transparent;
  padding-left: 24px;
  letter-spacing: 67px;
  background-image: linear-gradient(to left, #cacaca 76%, rgba(255, 255, 255, 0) 0%);
  background-position: bottom;
  background-size: 79px 1px;
  background-repeat: repeat-x;
  background-position-x: 60px;
  width: 510px;
  min-width: 510px;
  font-weight: bold;
  font-size: 20px;
}

#divInner {
  left: 0;
  position: sticky;
}

#divOuter {
  width: 455px;
  overflow: hidden;
}

input[type=text]::-ms-clear {
  display: none;
}
<div id="divOuter">
  <div id="divInner">
    <input id="otp21" class="otp_form_control" name="otp1" autocomplete="off" maxlength="6" type="text" />
  </div>
</div>

IE浏览器只能不工作......有人帮助我

0 个答案:

没有答案