CSS输入文字填充

时间:2018-08-20 07:56:28

标签: css internet-explorer input

我对包含日期的输入有一些问题,实际上只有我必须从日历中选择的输入。在chrome上一切正常,但在IE 11文本上几乎没有'out of line',但是当我选择日期,默认日期和页面加载时间但我没有点击输入时,日期是-10px时,它是固定的线。 那是html:

<input type="text" class="form-control" name="tripstart" value="20 Aug 2018" title="Enter the check-in date." data-content="Enter the check-in date." id="5">

这是CSS

.form-control {
  display: block;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #555555;
  background-color: #fff;
  background-image: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}

.form-control:focus {
  border-color: #66afe9;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

.form-control::-moz-placeholder {
  color: #999;
  opacity: 1;
}

.form-control:-ms-input-placeholder {
  color: #999;
}

.form-control::-webkit-input-placeholder {
  color: #999;
}

.form-control::-ms-expand {
  border: 0;
  background-color: transparent;
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
  background-color: #eeeeee;
  opacity: 1;
}

.form-control[disabled],
fieldset[disabled] .form-control {
  cursor: not-allowed;
}

textarea.form-control {
  height: auto;
}

input[type="search"] {
  -webkit-appearance: none;
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {
  input[type="date"].form-control,
  input[type="time"].form-control,
  input[type="datetime-local"].form-control,
  input[type="month"].form-control {
    line-height: 34px;
  }

  input[type="date"].input-sm,
  .input-group-sm > input.form-control[type="date"],
  .input-group-sm > input.input-group-addon[type="date"],
  .input-group-sm > .input-group-btn > input.btn[type="date"],
  .input-group-sm input[type="date"],
  input[type="time"].input-sm,
  .input-group-sm > input.form-control[type="time"],
  .input-group-sm > input.input-group-addon[type="time"],
  .input-group-sm > .input-group-btn > input.btn[type="time"],
  .input-group-sm
  input[type="time"],
  input[type="datetime-local"].input-sm,
  .input-group-sm > input.form-control[type="datetime-local"],
  .input-group-sm > input.input-group-addon[type="datetime-local"],
  .input-group-sm > .input-group-btn > input.btn[type="datetime-local"],
  .input-group-sm
  input[type="datetime-local"],
  input[type="month"].input-sm,
  .input-group-sm > input.form-control[type="month"],
  .input-group-sm > input.input-group-addon[type="month"],
  .input-group-sm > .input-group-btn > input.btn[type="month"],
  .input-group-sm
  input[type="month"] {
    line-height: 30px;
  }

  input[type="date"].input-lg,
  .input-group-lg > input.form-control[type="date"],
  .input-group-lg > input.input-group-addon[type="date"],
  .input-group-lg > .input-group-btn > input.btn[type="date"],
  .input-group-lg input[type="date"],
  input[type="time"].input-lg,
  .input-group-lg > input.form-control[type="time"],
  .input-group-lg > input.input-group-addon[type="time"],
  .input-group-lg > .input-group-btn > input.btn[type="time"],
  .input-group-lg
  input[type="time"],
  input[type="datetime-local"].input-lg,
  .input-group-lg > input.form-control[type="datetime-local"],
  .input-group-lg > input.input-group-addon[type="datetime-local"],
  .input-group-lg > .input-group-btn > input.btn[type="datetime-local"],
  .input-group-lg
  input[type="datetime-local"],
  input[type="month"].input-lg,
  .input-group-lg > input.form-control[type="month"],
  .input-group-lg > input.input-group-addon[type="month"],
  .input-group-lg > .input-group-btn > input.btn[type="month"],
  .input-group-lg
  input[type="month"] {
    line-height: 46px;
  }
}

0 个答案:

没有答案