【发布时间】:2022-01-20 20:38:55
【问题描述】:
我在列的容器中有一个现有按钮。我需要将其从桌面上的正常位置更改为固定到移动设备上的屏幕底部。
#free-offer-button {
background-color: #d97b6c;
border-color: #d97b6c;
border-radius: 0px;
color: #ffffff;
font-size: 18px;
font-weight: bold;
padding: 9px 23px;
}
<Col xs={{ span: 12, order: 2 }} md={{ span: 6, order: 1 }}>
<h3 id='first-container-header'>Treat your pet (and you).</h3>
<h3>It's on us!</h3>
<br></br>
<p>Treat your pet to a healthy treat for <strong>free</strong> to kick off your Public Goods trial membership.</p>
<p><strong>See what it's like to be a Public Goods member.</strong></p>
<ul>
<li>Included in your bundle is free 2-week membership that gives you unlimited access to our entire collection of sustainable essentials.</li>
<li>Take a load off. We make it easy for your to make better choices. Always included: eco-friendly products you can trust.</li>
</ul>
<div className='d-grid mt-5'>
<Button variant="btn-block" id='free-offer-button'> Claim your free offer</Button>
</div>
</Col>
【问题讨论】:
-
你试过 position absolute 和 bottom: 0 吗?
-
这能回答你的问题吗? Place button on bottom of div or screen
标签: css twitter-bootstrap react-bootstrap styling