【问题标题】:how to make to type only 80 in search box如何在搜索框中只输入 80
【发布时间】:2021-12-31 05:26:14
【问题描述】:

我想创建一个搜索框,默认情况下用户最多只能输入 80% 的十字图标在这里只是一点点它的权利我想添加一个搜索图标如何做到这一点。 这是我的搜索框move cross icon little bit left to add another search icon
我要实现 search box like this

#searchBtn {
                margin-left: 0px;
                color: rgb(0, 0, 0);
                background-color: rgba(252, 174, 158, 0);
                border: none;
            }
            #searchBox {
                margin-left: 0px;
    
            } 
    
    <div class="searchbox">
            <input type="search" name="" id="searchBox">
            <button id="searchBtn" type="submit"><i class="far fa-search"></i></button>
     </div>

【问题讨论】:

    标签: javascript html css web


    【解决方案1】:

    将边框移动到容器而不是输入。

    .searchbox {
        width: fit-content;
        width: -moz-fit-content;
    
        border: solid 1px black;
    }
    
    #searchBox {
        border: none;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-16
      • 2014-12-22
      • 2022-01-04
      • 2016-01-04
      • 2020-12-24
      • 1970-01-01
      相关资源
      最近更新 更多