1 回答
TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超4個(gè)贊
您可以嘗試使用以下 HTML 和 CSS。
.section{
position: relative;
}
.second_section{
margin-top: 0px;
}
.first_section{
position: absolute;
margin-top: 70px; /* Adjust this margin top pixed according to the space you needed. */
}
<div class="section">
<div class="first_section">
<a href=''>
<button style='background: linear-gradient(to bottom, #cc99ff 0%, #ff99cc 100%);'>
<h3> HMT Rice</h3>
</button>
</a>
</div>
<div class="second_section">
<a href=''>
<button style='background: linear-gradient(to bottom, #cc99ff 0%, #ff99cc 100%);'>
<h3> PKS Rice</h3>
</button>
</a>
</div>
</div>
我已通過(guò)檢查元素解決了您網(wǎng)站中的問(wèn)題。請(qǐng)遵循以下代碼。
您應(yīng)該使用slide-button-wrapper div包裝按鈕 div 和滑塊 div并添加 css。
<div class="slide-button-wrapper">
<div class="mainsme" id="grid">
<h2 style="font-size:28px;">Shop by Category</h2>
<div class="gridmine">
<!---buttons will goes here-->
</div>
</div>
<div class="main-row slider-section" style="order: 1;">
<banner codes are here>
</div>
</div>
@media only screen and (max-width: 600px) {
.slide-button-wrapper {
display: flex;
flex-direction: column;
}
.mainsme{
order: 2;
}
.slider-section{
order: 1
}`
}
添加回答
舉報(bào)
