gpt4 book ai didi

reactjs - 在 React BootStrap 中的行元素之间添加空格

转载 作者:行者123 更新时间:2023-12-05 08:11:24 24 4
gpt4 key购买 nike

我是 React 和 react-bootstrap 的新手。我有一个 Row 组件,想要在屏幕顶部和各个行元素之间留出间距。我目前正在编辑它的 CSS,但听说乱用框架的 CSS 可能不好?

const Styles = styled.div`
.background {
background: url(${backgroundImage}) no-repeat fixed bottom;
background-size: cover;
height: 100vh;
position: relative;
}

#row {
position: relative;
top: 200px;
}
`;

class Signup extends React.Component {
render() {
return (
<Styles>
<div className="background">
<Container>
<Row id="row" className="justify-content-md-center">
<ExtraInfo />
<SignupForm />
</Row>
</Container>
</div>
</Styles>
);
}
}

export default Signup;

enter image description here

最佳答案

在 React-Bootstrap 中使用 Form.Group。它在列上添加 15px 的填充以分隔列的内容。

关于reactjs - 在 React BootStrap 中的行元素之间添加空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57832572/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com