我正在编写一个网页,该网页使用一系列单选按钮和下拉菜单来更改屏幕上显示的数据。每个 radio 都对应一个下拉菜单,我想将它们排成一行,但我不知道如何让第三个 radio 出现在其他两个的右侧而不是它们的下方。谁能帮忙?
这是我的代码:
<form action="" style="float: left">
<input type="radio" name="yearLessGreaterOption" value="<" onchange="setYearLessGreaterFilter(this.value)"><
<input type="radio" name="yearLessGreaterOption" value="=" onchange="setYearLessGreaterFilter(this.value)" checked>=
<input type="radio" name="yearLessGreaterOption" value=">" onchange="setYearLessGreaterFilter(this.value)">>
</form>
<form action="">
<input type="radio" name="roundLessGreaterOption" value="<" onchange="setRoundLessGreaterFilter(this.value)"><
<input type="radio" name="roundLessGreaterOption" value="=" onchange="setRoundLessGreaterFilter(this.value)" checked>=
<input type="radio" name="roundLessGreaterOption" value=">" onchange="setRoundLessGreaterFilter(this.value)">>
</form>
<form action="">
<input type="radio" name="goalsH1LessGreaterOption" value="<" onchange="setGoalsH1LessGreaterFilter(this.value)"><
<input type="radio" name="goalsH1LessGreaterOption" value="=" onchange="setGoalsH1LessGreaterFilter(this.value)" checked>=
<input type="radio" name="goalsH1LessGreaterOption" value=">" onchange="setGoalsH1LessGreaterFilter(this.value)">>
</form>
这是相关页面的图片:
最佳答案
您是否有理由希望它们出现在表单标签中?如果您删除标签,它们将显示为对齐。否则,将 style="float:left;"
添加到其他表单标签即可。
关于html - 如何更改html中单选按钮的位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37621492/