這是對flexbox程序的測試。
以下是我的代碼:
.box-1 {
background-color: green;
border-radius: 1rem;
padding-left: 25px;
padding-right: 25px;
width: 50px;
height: 100px;
}
.box-2 {
background-color: green;
padding-left: 25px;
border-radius: 1rem;
padding-right: 25px;
width: 50px;
height: 100px;
}
.box-3 {
background-color: green;
border-radius: 1rem;
padding-left: 25px;
padding-right: 25px;
width: 50px;
height: 100px;
}
.container {
display: flex;
flex-direction: row;
align-content: center;
justify-content: space-evenly;
}
<div class="container">
<div class="box-1">Item 1</div>
<div class="box-2">Item 2</div>
<div class="box-3">Item 3</div>
</div>