gpt4 book ai didi

CSS 搜索框如何保持响应

转载 作者:行者123 更新时间:2023-11-28 11:06:12 26 4
gpt4 key购买 nike

我几乎不需要帮助就能让我的搜索框响应

HTML:

<div class="span12">
<div id='search-box'>
<form action='/search' id='search-form' method='get' target='_top'>
<input class='search-text' name='q' placeholder='Search by name' type='text'/>
<button id='search-button' type='submit'>src</button>
</form>
</div>
</div>

CSS:

#search-box {
width:100%;
height:44px;
background:#ffd965;
border-bottom:1px solid #fff;
display:block;
}

#search-form {
positoin:absolute;
left:16px;
right:16px;
width:100%;
height:30px;
background-color:#fff;
display:block;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}

#search-text {
width:100%;
height:25px;
background: transparent;
}

#search-box input[type="text"] {

}

#search-button {
position: absolute;
top: 0;
left: 15px;
height: 42px;
width: 30px;
text-align: center;
border-width: 0;
background-color: transparent ;
background-image:url('../images/search.png');
background-repeat:no-repeat;
}

我的代码是:JSFiddle

最佳答案

试试这个

.search-text {
width:50%;
}

看到这个

http://jsfiddle.net/La9r6/2/

关于CSS 搜索框如何保持响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22242455/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com