1
.page-setting-popup {
position: absolute;
background-color: tomato;
padding: 10px 10px 10px 0;
height: 120px;
display: flex;
flex-flow: row;
justify-content: space-between;
align-items: flex-start;
}
.setting-popup-controls {
display: flex;
flex-flow: row;
}
我有這樣的代碼在不同的地方。我不喜歡我應該幾乎每塊使用顯示。我覺得如果我這樣做一些課,我會很棒。css類架構顯示
.flex {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-items: center;
}
或者它應該是這樣的?
.flex {
display: flex;
}
.v-centered {
align-items:center;
}
.h-centered {
justify-content: center;
}
.stretch-between {
justify-content: space-between;
}
我認爲第二個變體更加靈活。但我需要你的意見)
<div class="page-setting-popup">
<div class="setting-popup-icon"><span class="zmdi zmdi-time-restore"></span></div>
<div class="setting-popup-main"><span class="setting-header text-uppercase">Sync. frequency</span>
<div class="setting-popup-controls">
<input type="number" min="0"/>
<button type="submit">V</button>
<button>X</button>
</div>
</div>
也分享你的相關HTML代碼。沒有這個。我們無法幫助你。也......用你的代碼來解釋你想要達到的目標 –