Input 和button 在同一行上

澹台季萌
2023-12-01
<form action="Indexdefault.aspx?ID=2b279cfc-a6bf-40dc-b6d4-1f2314113766" method="get" target="_blank">
                <div class="same">
                    <input type="text" name="keyword" class="textSearch" 
                        placeholder="搜索" />
                    <button class="btnSearch"></button>
                </div>
            </form>
.same{
            padding: 0;text-align:center;
            margin: 0 auto;
            border: 1px solid red;width:630px;
            height: 47px;vertical-align: middle;font-size:0px;
        }
        .textSearch
        {
            height:45px;line-height:45px;width:500px;margin:0 auto;font-size:18px;padding:0;vertical-align:top;
            border:0;outline:none;
        }
        .btnSearch
        {
            background:transparent;border:0;
            background-image:url(img/search.png);
            background-repeat:no-repeat;
            width:130px;height:47px;margin:0;padding:0;
            border:none;outline:none;border-width:0;
            border-style:none;box-sizing: padding-box;
        }

 

转载于:https://www.cnblogs.com/gxivwshjj/p/7693481.html

 类似资料: