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

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

如何在附加圖像時使引導程序的輸入組中的邊框保持一致?

如何在附加圖像時使引導程序的輸入組中的邊框保持一致?

HUX布斯 2023-09-25 16:44:09
我正在嘗試在導航欄中創建一個搜索框,并得到以下效果:所以我的問題是我無法使邊框保持一致 - 我希望圖標與“搜索...”框具有相同的邊框,并且它們之間沒有邊框。它的代碼如下所示:<div class="input-group" style="width: 10rem;"><input type="search" placeholder="Search..." aria-describedby="button-addon5" class="form-control"><div class="input-group-append">    <button id="button-addon5" type="submit" class="btn" style="background-color: White;">        <svg class="bi bi-search" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg" style="color: rgb(230,0,0);">          <path fill-rule="evenodd" d="M10.442 10.442a1 1 0 011.415 0l3.85 3.85a1 1 0 01-1.414 1.415l-3.85-3.85a1 1 0 010-1.415z" clip-rule="evenodd"/>          <path fill-rule="evenodd" d="M6.5 12a5.5 5.5 0 100-11 5.5 5.5 0 000 11zM13 6.5a6.5 6.5 0 11-13 0 6.5 6.5 0 0113 0z" clip-rule="evenodd"/>        </svg>    </button></div>我最接近解決這個問題的方法是查找 bootstrap 的 css 并將邊框屬性復制到按鈕元素,然后將 border-left 設置為 none,但是盡管沒有左邊框,但仍存在圓角可見的問題。即使可以刪除左邊的角,我覺得一定有更好的方法......:/
查看完整描述

1 回答

?
翻過高山走不出你

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

使用按鈕上的邊框實用程序...


   <div class="input-group" style="width: 10rem;">

        <input type="search" placeholder="Search..." aria-describedby="button-addon5" class="form-control">

        <div class="input-group-append">

            <button id="button-addon5" type="submit" class="btn border-left-0 border" style="background-color: White;">

                <svg class="bi bi-search" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg" style="color: rgb(230,0,0);">

                    <path fill-rule="evenodd" d="M10.442 10.442a1 1 0 011.415 0l3.85 3.85a1 1 0 01-1.414 1.415l-3.85-3.85a1 1 0 010-1.415z" clip-rule="evenodd" />

                    <path fill-rule="evenodd" d="M6.5 12a5.5 5.5 0 100-11 5.5 5.5 0 000 11zM13 6.5a6.5 6.5 0 11-13 0 6.5 6.5 0 0113 0z" clip-rule="evenodd" />

                </svg>

            </button>

        </div>

   </div>

演示: https: //codeply.com/p/wLgphISgj2


查看完整回答
反對 回復 2023-09-25
  • 1 回答
  • 0 關注
  • 109 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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