gpt4 book ai didi

html - 在下拉列表前添加文本标签

转载 作者:太空狗 更新时间:2023-10-29 16:51:55 24 4
gpt4 key购买 nike

我试图在选择框前面添加标签,我已将包含这两个元素的 div 标签设置为“inline-block”。但是,跨度仍在选择框的顶部。

<div class="unselected-field" style="display: inline-block;" id="selectCountry">
<span>test</span><select id="countrySelect" name="countrySelect"></select>
</div>

有什么想法吗?我在使用 Chrome...

最佳答案

我通常将标签包裹在输入的周围:

<div class="unselected-field" style="display: inline-block;" id="selectCountry">
<label>Test:<select id="countrySelect" name="countrySelect">
<option>Option 1</option>
</select>
</label>
</div>​

关于html - 在下拉列表前添加文本标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9762462/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com