我有以下html代码:
<form>
<div class="form-group">
<label for="formControlRange">Example Range input</label>
<input type="range" class="form-control-range" id="formControlRange">
</div>
</form>
我从 bootstrap 4 文档( https://getbootstrap.com/docs/4.1/components/forms/#range-inputs )中借来的并产生以下内容:
我想隐藏按钮,直到有人单击该行。我们能做到吗?
附言。我想在我的 oTree 代码中使用这个范围输入:
<label class="col-form-label">
Pizza is the best food:
</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">Disagree</span>
</div>
<input type="range" name="pizza" min="1" max="5" step="1" class="form-control">
<div class="input-group-append">
<span class="input-group-text">Agree</span>
</div>
</div>
从 oTree 文档中借来的:https ://otree.readthedocs.io/en/latest/forms.html#widgets