gpt4 book ai didi

jquery - 在表格中水平显示单选按钮选项?

转载 作者:太空宇宙 更新时间:2023-11-04 01:40:16 25 4
gpt4 key购买 nike

当前代码:

 <tr>
<td style="font-family: 'Josefin Sans', sans-serif;font-size: 100%;">
Does our applying process live up to your expectations? <br/>
<input type="radio" class="myCheckbox2" id="0" name="XX" value="Strongly Agree" >Strongly Agree<br>
<input type="radio" class="myCheckbox2" id="0" name="XX" value="Somewhat Agree" >Somewhat Agree <br>
<input type="radio" class="myCheckbox1" id="0" name="XX" value="Neither Agree nor Disagree" >Neither Agree nor Disagree<br>
<input type="radio" class="myCheckbox1" id="0" name="XX" value="Somewhat Disagree" >Somewhat Disagree<br>
<input type="radio" class="myCheckbox1" id="0" name="XX" value="Strongly Disagree" >Strongly Disagree<br>
<input type="radio" class="myCheckbox2" id="0" name="XX" value="Not Applicable" >Not Applicable <br>
</td>
</tr>

这将在垂直列表中显示选项,我真的需要使用内联 css 水平显示它们。

理想情况下它应该是这样的:http://imgur.com/a/ns2nD

并且表中可以列出多个问题,而无需为每个问题指定答案标签。

最佳答案

你想要这样吗?

div {
display: inline-block;
float: left;
text-align: center;
width: 50px;
margin-right: 20px;
}
<tr>
<td style="font-family: 'Josefin Sans', sans-serif;font-size: 100%;">
Does our applying process live up to your expectations?
<br/>
<div>
<p>Strongly Agree</p>
<input type="radio" class="myCheckbox2" id="0" name="XX" value="Strongly Agree">
</div>
<div>
<p>Strongly Agree</p>
<input type="radio" class="myCheckbox2" id="0" name="XX" value="Strongly Agree">
</div>
<div>
<p>Strongly Agree</p>
<input type="radio" class="myCheckbox2" id="0" name="XX" value="Strongly Agree">
</div>
<div>
<p>Strongly Agree</p>
<input type="radio" class="myCheckbox2" id="0" name="XX" value="Strongly Agree">
</div>

</td>
</tr>

关于jquery - 在表格中水平显示单选按钮选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45503903/

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