【问题标题】:When i move to datetime, scroll is becoming visible当我移动到日期时间时,滚动变得可见
【发布时间】:2019-01-24 06:21:08
【问题描述】:

我使用默认<input type="date"/>

当我将光标移动到元素时,滚动变得可见。

【问题讨论】:

  • 您使用的是哪个日期时间选择器?
  • <td><input type="date" name="StartDateCreate" class="form-control" /></td> <td><input type="date" name="EndDateCreate" class="form-control" /></td> 仅引导样式。 DateTime 选择器是默认的 html 属性。

标签: asp.net-mvc bootstrap-4


【解决方案1】:

如果您只想删除滚动条,请为元素添加一个类,然后加载下面的 CSS 以使其完美运行。

<input type="date" class="unstyled" />

.unstyled::-webkit-inner-spin-button {
    -webkit-appearance: none;
  }

如果你不想像日历一样旋转,那么加载这个 css,

.unstyled::-webkit-inner-spin-button,
.unstyled::-webkit-calendar-picker-indicator {
     display: none;
 -webkit-appearance: none;
   }

查看this link

【讨论】:

  • 谢谢。这是一个很好的解决方案!但我以不同的方式解决这个问题。我编辑类“容器”的属性.container { max-width: 1200px; }
猜你喜欢
  • 1970-01-01
  • 2015-04-05
  • 2013-12-18
  • 2021-04-11
  • 1970-01-01
  • 2018-06-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多