横にソーシャルメディアボタンがいくつかある検索バーがあります。CSS3 Transitionプロパティを使用して、バーをクリックしたときにバーの幅を変更したかったのですが、ボタンもシフトする必要があります。これは私が今まで持っているものです
#s
{
transition: width 2s;
-moz-transition: width 2s; /* Firefox 4 */
-webkit-transition: width 2s; /* Safari and Chrome */
-o-transition: width 2s; /* Opera */
}
#s:focus {
width:110px;
}
.search input[type="text"], .widget_search input[type="text"] {
background-image: url(api/images/icons/search.png);
background-repeat: no-repeat;
background-position: 8px 50%;
padding-left: 25px;
width: 80%;
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
border-radius: 1em;
}
#searchform #searchsubmit {
clear: both;
display: block;
margin: 10px 0;
}
テキストフィールドの幅は問題なく変更されますが、繰り返しになりますが、テキストフィールドをクリックしたときに、テキストフィールドの横にあるボタンの位置を変更できるかどうかを知りたいと思います。
<div id="header-widget-area" class="widget-area" role="complementary">
<div id="pc_info_widget_designfolio-4" class="widget pc_info_widget">
<a class="sm-icon" target="_blank" href="http://www.facebook.com/TheRedBalloonToyStore">
<img width="32" height="32" alt="Facebook" src="http://redballoontoystore.com/w/wp-content/themes/designfolio/images/facebook.png">
</a>
<a class="sm-icon" target="_blank" href="http://twitter.com/RBToyStore">
<img width="32" height="32" alt="Twitter" src="http://redballoontoystore.com/w/wp-content/themes/designfolio/images/twitter.png">
</a>
<div class="search">
<form id="searchform" action="http://redballoontoystore.com/w/" method="get" role="search">
<span>
<input id="s" type="text" name="s" size="10" value="" placeholder="Search…">
<input id="searchsubmit" type="submit" value="Search">
</span>
</form>
</div>
</div>
</div>