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

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

如何在 bootstrap 4 自定義選擇中完全隱藏雙箭頭

如何在 bootstrap 4 自定義選擇中完全隱藏雙箭頭

aluckdog 2023-01-06 11:03:13
已經給出了如何隱藏 bootstrap 4 自定義選擇字段右側的雙箭頭的答案,如此處所示。生成的選擇框仍將右側的文本隱藏在現在不透明的箭頭后面。我希望能夠使用與左側一樣多的右側空間來顯示專為移動設備設計的顯示器。換句話說,可以進行哪些額外的更改以使文本在選擇框的最右側可見。您可以通過調整屏幕寬度來查看問題。.custom-select{background-image: none !important;}<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"/><div class="form-group">  <div class="col-8">    <div class="input-group">      <select class="custom-select">        <option>end of text string will hide behind opaque double arrow around here</option>        <option>2</option>      </select>    </div>  </div></div>  
查看完整描述

1 回答

?
哆啦的時光機

TA貢獻1779條經驗 獲得超6個贊

這是一個填充問題。使用 'padding-right' 減少空白。


.custom-select{

background-image: none !important;

padding-right:5px !important; 

}

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"/>

<div class="form-group">

  <div class="col-8">

    <div class="input-group">

      <select class="custom-select">

        <option>end of text string will hide behind opaque double arrow around here</option>

        <option>2</option>

      </select>

    </div>

  </div>

</div>

  

注意:5px 只是一個示例,您可能希望確保左右填充匹配。



查看完整回答
反對 回復 2023-01-06
  • 1 回答
  • 0 關注
  • 209 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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