我設計了搜索欄造型光標在文本輸入與CSS
下面表格是HTML
<form class="search-form" action="index_submit" method="get" accept-charset="utf-8">
<input type="search" name="search" placeholder="Search here...">
<button type="submit"><i class="fa fa-search"></i></button>
<div class="clearfix"></div>
</form>
這裏是我的CSS
.search {
position: static;
}
.search-box {
position: absolute;
top: 50%;
left: 50%;
}
.search-form input[type="search"] , .search-form button {
outline: none;
border: none;
padding: 10px;
margin: 0;
float: left;
color: black;
}
.search-form input {
background-color: yellow;
}
.search-form button {
text-align: center;
}
我在該文本字段中閃爍的光標遇到了問題。我想讓光標在中間垂直對齊。我給了填充,但它不工作。我想讓CSS自定義該遊標。 謝謝。
看起來Chrome和Firefox精細改變了我的CSS。您正在測試哪個瀏覽器? – 2014-10-12 06:58:48
它似乎工作正常。 – 2014-10-12 07:23:31