亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Laravel 和 Bootstrap 4 中按鈕文本未正確居中

Laravel 和 Bootstrap 4 中按鈕文本未正確居中

蝴蝶刀刀 2024-01-22 14:57:14
我的 laravel 應用程序中有一個按鈕<a href="{{ url('/product') }}" class="btn btn-default px-5 mt-3 rounded subscribe" role="button">{{ __('More info') }}</a>所以我需要按鈕文本位于按鈕的中心。但目前文本并未正確居中于按鈕目前按鈕看起來像這樣。文本沒有很好地居中。在我的 css 中,我有以下類代碼,訂閱.subscribe {            background-color: #5ABDBA;            color: #fff;            border-radius: 40px!important;            height: 43px;            text-transform: capitalize!important;            vertical-align: middle;        }我正在使用 bootstrap 4 。
查看完整描述

2 回答

?
瀟瀟雨雨

TA貢獻1833條經驗 獲得超4個贊

為什么要強制按鈕高度?


并始終青睞框架現有類


.subscribe { background-color: #5abdba; }


<a href="/" class="btn btn-default px-5 mt-3 rounded-pill text-white text-capitalize subscribe"  role="button">{{ __('More info') }}</a>


查看完整回答
反對 回復 2024-01-22
?
慕容3067478

TA貢獻1773條經驗 獲得超3個贊

如果你想在 css 中保持高度,那么在標簽集的類d-flexalign-items-center



查看完整回答
反對 回復 2024-01-22
  • 2 回答
  • 0 關注
  • 143 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號