设置一个DIV固定在底部,并且左右固定,垂直居中
生活随笔
收集整理的這篇文章主要介紹了
设置一个DIV固定在底部,并且左右固定,垂直居中
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
HTML
<footer><div class="footer"> <div class="btn_mes"><input type="button" class="withdrawals" id="btn2" value="升級為正式萌團長"></div> </div></footer>CSS
.footer {width: 100%;position: absolute;bottom: 0;}.btn_mes {margin-bottom: 45px;width: 100%;padding-left: 15px;padding-right: 15px;}.withdrawals {width: 100%;height: 44px;background: none;border: 1px solid #ff6f60;color: #ff6f60;font-size: 14px;border-radius: 4px;}總結
以上是生活随笔為你收集整理的设置一个DIV固定在底部,并且左右固定,垂直居中的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 无主之地3steam和epic可以联机吗
- 下一篇: 同级子目录下重新设置属性失效