现场小提琴:
http://jsfiddle.net/jMAzr/1/
Apple.com 上的工作示例:http: //www.apple.com/
<html>
<head>
<style>
body {
background:#000000;
}
li {
list-style:none;
display: list-item;
}
ul.menu li {
float:left;
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
text-decoration: none;
font-weight: 400;
}
ul.menu li a {
text-decoration:none;
}
.header-tab-title {
display: block;
position: relative;
height: 46px;
line-height: 46px;
cursor: pointer;
font-size: 16px;
color: #fff;
text-align: center;
}
.search-field {
width: 70px;
border-radius:10px;
transition: width 0.5s ease-in-out,margin-left 0.5s ease-in-out;
-webkit-transition: width 0.5s ease-in-out,margin-left 0.5s ease-in-out;
-moz-transition: width 0.5s ease-in-out,margin-left 0.5s ease-in-out;
-o-transition: width 0.5s ease-in-out,margin-left 0.5s ease-in-out;
animation-direction:reverse;
-webkit-animation-direction:reverse; /* Safari and Chrome */
border: 1px solid #353535;
height:18px;
padding: 0px 23px 4px;
color:#FFF;
}
.search-field:focus {
color:#000;
width: 140px;
margin-left:-70px;
height:20px;
}
</style>
</head>
<body>
<ul class="menu">
<li><span class="header-tab-title" style="width:124px;">Produtos</span></li>
<li><span class="header-tab-title" style="width:151px;">Sites Prontos</span></li>
<li><span class="header-tab-title"style="width:192px;" >Anuncie no Google</span></li>
<li><span class="header-tab-title" style="width:230px;">Facebook Para Negócios</span></li>
<li><span class="header-tab-title" style="width:152px;">Hospedagem</span></li>
<li><span class="header-tab-title" style="width:110px;"><input class="search-field" type="search"></span></li>
</ul>
</body>
</html>