0
私は親切に私を助けてください、私はそれが(検索ボックス)が中心に置くときにGoogleのホームページに似た検索ボックスを設計しようとしていますフォーカスを当てると、テキストボックスは左上に移動します。私は検索ボックスのサイズを変更することができましたが、私はそれを望みどおりに再配置することはできません。検索ボックスを再配置/フロートする方法
<style>
input[type=text] {
width: 450px;
}
input[type=text]:focus {
width: 130px;
box-sizing: border-box;
border: 2px solid #ccc;
border-radius: 4px;
font-size: 16px;
background-color: white;
background-image: url('searchicon.png');
background-position: 10px 10px;
background-repeat: no-repeat;
padding: 12px 20px 12px 40px;
-webkit-transition: width 0.4s ease-in-out;
transition: width 0.4s ease-in-out;
}
</style>
<form id="form1" action="/search.php" method='GET' style="padding: 20px">
<center>
<h1>Huzzle</h1>
<p>
<input name="search" id="search" type="text" class="footer1" size='50' placeholder=" Search for service...."></p>
<p> </p>
</center>
<body>
<p class="footer1">
<center>
<input name='submit' type='submit' class="md-trigger md-setperspective search" value='Search'>
</center>
</p>
</form>
</body>
質問を編集して既存の(関連する)コードを表示してください。 – nnnnnn
詳しい説明を追加することをおすすめします。また、現在のソリューションを提供してください。 –
最近の編集では何の助けもありません –