我真的是 CSS 初学者,不知道如何水平对齐引导下拉按钮。这是我的项目的代码片段:https://codesandbox.io/s/dreamy-resonance-80id9?file=/src/App.js
我们的想法是让它们在页面顶部水平对齐,它们之间和边框之间的间距相等,因此它们是展开的。
答案 0 :(得分:0)
你只需要改变显示模式:
.buttonContainer {
background-color: white;
padding: 20px;
text-align: center;
width: 100%;
display: flex;
justify-content: space-evenly;
}
这个flex guide可以帮助你