Google and Baidu homepage of the search box are <input>+<button> mode, Bing's search box feel better. In short, it is to put the submit button to <input>, in fact, this is not done, can only disguise.
? 1. [Code] main source code
<title> Handful | The implementation of the search box </title>
<meta charset= "UTF-8" >
<style type= "Text/css" >
<!--
Body {
font-family: ' Lucida Sans Unicode ', ' Lucida Grande ', Sans-serif;
font-size:14px;
}
H1 {
margin-top:0px;
margin-bottom:8px;
}
/* Link */
A
Text-decoration:none;
Color: #1c00ff;
}
a:hover {
Color: #5f00e4;
}
Fieldset.search {
padding:0px;
Border:none;
width:232px;
Background: #e0e0e0;
}
Fieldset.search:hover {
Background: #a8a8a8;
}
. Search input,. Search button {
Border:none;
Float:left;
}
. Search Input.box {
height:28px;
width:200;
margin-right:0px;
padding-right:0px;
Background: #e0e0e0;
margin:1px;
}
. Search Input.box:focus {
Background: #e8e8e8;
Outline:none;
}
. Search BUTTON.BTN {
Border:none;
width:28px;
height:28px;
margin:0px Auto;
margin:1px;
Background:url (http://sandbox.runjs.cn/uploads/rs/339/livk7pl5/search_blue.png) no-repeat top right;
}http://www.huiyi8.com/hunsha/chuangyi/?
. Search Button.btn:hover {creative wedding photo
Background:url (http://sandbox.runjs.cn/uploads/rs/339/livk7pl5/search_black.png) No-repeat bottom right;
}
/* Article style */
. Article {
}
-
</style>
<body>
<div>
<form method= "Get" id= "Searchform" action= "http://blog.iliyang.cn/" >
<fieldset class= "Search" >
<input type= "text" class= "box" name= "S" id= "S" class= "Inputtext" placeholder= "Handful a bouquet" x-webkit-speech>
<button class= "btn" title= "SEARCH" > </button>
</fieldset>
</form>
</div>
<article class= "article" >
</article>
</body>
?
Search box implemented by HTML/CSS