如何删除ANTD抽屉中的边距
我使用antd抽屉。 抽屉的左右边距无法移除,因此步骤组件被左右推了几个边距(红色圆圈)。
然后,antd 步骤蓝色滑块也有一个边距(绿色圆圈)。
我尝试放置 margin:0px
和 padding:0px
但似乎无法解决这些问题。
代码沙箱: https:// codesandbox.io/s/basic-antd-4-19-5-forked-iq13nx?file=/index.js
I use a antd drawer.
The margin left and right of the drawer couldn't be removed, so the steps component is pushed a few margins from left and right (red circle).
Then, The antd steps blue slider is also has a margin (green circle).
I tried putting margin:0px
and padding:0px
but doesn't seems to fix these issues.
Code sandbox: https://codesandbox.io/s/basic-antd-4-19-5-forked-iq13nx?file=/index.js
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您还可以使用
Drawer
属性“bodyStyle
”来修改正文的样式:You can also use the use the
Drawer
props "bodyStyle
" to modify the style of the body:如果要删除红色边距,则需要左右设置填充到0,并在垂直方面保持24px:
对于蓝色下划线(图像中的绿色信号),必须更改此样式:
If you want remove the red margin, you need set padding left and right to 0 and remain the 24px in vertical sides:
For the blue underscore (your green signal in the image), you must change this style:
BodyStyle
现在已弃用使用代码> :
bodyStyle
now is deprecatedUse
styles
: