[英]Radio buttons and text orientation
How can I move the text of a radio button closer to the button itself? 如何将单选按钮的文本移动到更靠近按钮本身的位置? When I create a radio button, the button text appears about 10px away from the button, making the horizontal orientation awkward because the text then begins to overlap onto the button to the right.
当我创建一个单选按钮时,按钮文本显示距离按钮大约10px,使水平方向变得笨拙,因为文本然后开始重叠到右侧的按钮上。
How can I change the distance of the text from the button? 如何更改按钮中文本的距离?
Note in the below style="margin:0;"
请注意以下
style="margin:0;"
<input type="radio" style="margin:0;" value="radio" id="radio" name="radio" />Some Text
If you want to do this with a class I'd recommend wrapping the radio buttons because type selectors don't work in all browsers: 如果你想用一个类做这个,我建议包装单选按钮,因为类型选择器不适用于所有浏览器:
<style type="text/css">
.nomarginradio input{ margin:0; }
</style>
<div class="nomarginradio">
<input type="radio" value="radio" id="radio" name="radio" />Some Text
</div>
Put a span tag on the text of the input button. 在输入按钮的文本上放置span标记。 and adjust its selectors padding or margin.
并调整其选择器填充或边距。 Some text
一些文字
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.