蚂蚁设计中的大版式使其他块忽略跨度

发布于 2025-01-18 00:52:32 字数 515 浏览 2 评论 0原文

我想用SPAN 18的ANT设计制作一个网格,因为

<Row>
<Col span={18}>
    <Row>
        <Col span={24}>
            <Button/>
        </Col>
        <Col span={24}>
            <Typography>kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkklllllllllllllllllllllllloooooooo</Typography>
        </Col>
    </Row>
</Col>

如果版式的长度超过块的长度,我会制作此代码,它开始伸展而不是包装,

而是试图为版式设置宽度,它不起作用(它都无法正常工作(文本被包装,但按钮仍然伸展)

试图更改版式跨度,它不起作用(文本被包装,但按钮仍然伸展)

I want to make a grid with ant design with span 18, for that I make this code

<Row>
<Col span={18}>
    <Row>
        <Col span={24}>
            <Button/>
        </Col>
        <Col span={24}>
            <Typography>kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkklllllllllllllllllllllllloooooooo</Typography>
        </Col>
    </Row>
</Col>

if the length of Typography exceeds the length of the block, it starts to stretch instead of wrapping

I tried to set width for typography, its not working (text being wrapped, but buttons still stretch)

tried to change typography span, its not working (text being wrapped, but buttons still stretch)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

虫児飞 2025-01-25 00:52:32

我发现了。事实证明,问题是我彼此之间有很多弹性,所以当文本变大时,这会导致父母弹性扩展等等。我通过将挠性尺寸限制为最大宽度来解决此问题:最小值,现在它不比按钮大。感谢您的回复,伙计们 -

I figured it out. Turns out the problem was that I had a lot of flex in each other, so when the text got big, it caused the parent flex to expand and so on. I solved this problem by limiting the flex size to max width: min-content, now it is no bigger than a button. Thanks for the response, guys –

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文