Ant Design - Reactjs:单选按钮组
我是新手,我有一个ReactJS AntD问题,该问题与无线电按钮组。是否有任何方法可以在每个广播按钮之间有更大的差距或空间?例如,页面左侧的一个广播按钮,另一侧第二。 https://codesandbox.io/ S/Radiogroup-Antd-4-19-4-forked-134cps?从插件请忽略代码中的滑块。
I am newbie, and I have a reactjs antd issue with radio buttons group. Is there any way to have a bigger gap or space between each radio button? For example one radio button on left side of the page and second on the other side. https://codesandbox.io/s/radio-group-antd-4-19-4-forked-134cps?from-embed ignore the slider in code please.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果你创建了一个 css 类,那么你就可以设置你的 React 组件的样式。
以下是我在沙盒中的操作方法:
这会将 2022 单选按钮放在屏幕的最右侧,与第一个单选按钮位于同一 y 维度上。您可以更改“index.css”中的“right”值来根据需要进行调整。
If you make a css class then you can style your react components.
Here's how I did it in your sandbox:
This will put the 2022 radio at the very right side of the screen, on the same y-dimension as the first radio button. You can change the 'right' value in 'index.css' to adjust it as you please.
使用 ant Row 来调整内容“之间的空格”
use ant Row with justify content "space-between"
使用可以使用 Antd 网格来对齐单选按钮
屏幕截图:
Use can use Antd grid to align the radio buttons
Screenshot: