简体   繁体   English

Ant 设计布局组件

[英]Ant Design Layout Component

I have a very basic implementation of ant design in a react project.我在反应项目中有一个非常基本的 ant 设计实现。 I used create-react-app and have went through the suggested steps detailed in the antd documentation.我使用create-react-app并完成了 antd 文档中详述的建议步骤。

The problem i have is resizing the Content section of the Layout component.我遇到的问题是调整Layout组件的Content部分的大小。 Currently, even though my Dragger component is wrapped within Content component, it is appearing below it.目前,即使我的Dragger组件包装在Content组件中,它也出现在它的下方。 The Content component is represented by the Grey area on the screen. Content组件由屏幕上的灰色区域表示。 Attempts at resizing it using styling have not yielded desired results.尝试使用样式调整它的大小并没有产生预期的结果。

Here is the code pen .这是代码笔 Im simply trying to ensure that the Upload box is located within the Content section, and not below it.我只是想确保上传框位于内容部分内,而不是在其下方。

Any help would be awesome!任何帮助都是极好的!

You've wrapped the Dragger component in a div that is absolutely positioned in the center of the body, so it's disregarding the regular content flow.您已将Dragger组件包装在绝对位于主体中心的 div 中,因此它忽略了常规内容流。 If you remove that inline CSS it will behave as you'd expect.如果您删除该内联 CSS 它将按照您的预期运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM