【问题标题】:Need a input type for duration持续时间需要输入类型
【发布时间】:2018-05-10 10:07:54
【问题描述】:

我需要在 html 输入中询问用户持续时间。

f.e. 03h 12m 12s

有没有办法给他一个选择,比如输入类型日期?

我使用 Bootstrap 4。

谢谢

【问题讨论】:

    标签: twitter-bootstrap forms input


    【解决方案1】:

    <input type='number'> 设置minmax

    演示

    input,
    label {
      font: inherit;
      width: 4ch;
    }
    <form id='duration'>
      <input id='h' name='h' type='number' min='0' max='24'>
      <label for='h'>h</label>
      <input id='m' name='m' type='number' min='0' max='59'>
      <label for='m'>m</label>
      <input id='s' name='s' type='number' min='0' max='59'>
      <label for='s'>s</label>
    </form>

    【讨论】:

      猜你喜欢
      • 2020-05-20
      • 1970-01-01
      • 2011-01-15
      • 2014-09-14
      • 2020-01-03
      • 1970-01-01
      • 2012-04-13
      • 2020-01-28
      • 1970-01-01
      相关资源
      最近更新 更多