Override the -webkit-search-cancel-button
问题 I'm trying to override the small (x) that appears in the search bar, to have it do more than clear the search Currently this is my search bar: HTML: <input type="search" class="form-control" id="inputSearch" placeholder="Search for node" onchange="searchForNode(this)"></div> CSS: #inputSearch::-webkit-search-cancel-button{ position:relative; right:20px; } Any ideas? Thanks. 回答1: DEMO 1) Mozilla treats search inputs as text. For Webkit browsers however (Chrome, Safari), the search input is