我正在使用 React 和 Ant Design 为 Web 应用程序创建一个简单的 UI。我想在屏幕的右上角放置一个按钮。我的组件渲染函数看起来像这样:
return (
<div style={{something here?}}>
<div style={{something else here?}}>
<Button>Logout</Button>
</div>
<div>
{Main components here}
</div>
</div>
);
Run Code Online (Sandbox Code Playgroud)
我尝试过向外部和/或内部圆盘添加各种东西,但无法将按钮移动到右侧 - 它始终保留在左侧。如何让它向右移动?