React Antd:如何在垂直分隔线和旁边的任何内容之间删除间距?
</div>
<Divider type="vertical" style={{ width: "5px", height: "auto" , marginRight : '0px' , padding : '0 0'}} />
<div style={{ padding : '0 0' , marginRight : '0px'}}>
这是我尝试过的,似乎无法删除分隔线和步进器(ANTD元素)之间的空间。
</div>
<Divider type="vertical" style={{ width: "5px", height: "auto" , marginRight : '0px' , padding : '0 0'}} />
<div style={{ padding : '0 0' , marginRight : '0px'}}>
This is what I have tried and couldn't seem to remove the space between the divider and stepper(Antd element).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
设置填充:
默认情况下为div#容器antd步骤的0px具有iD =容器的div = 24px
您看到的额外空间是由于该div-padding所致。
您可以通过在styles.css中定义以下代码并在组件中导入样式来将其删除。
检查此 sandbox 更多的理解
Set padding:0px to div#container
Antd Steps by default has a div with id=container and padding=24px
The extra space you see is due to that div-padding.
You can remove it by defining the following code in styles.css and importing the styles in the component.
Check this sandbox for more understanding