私が持っているのは、検索バーとsubmit
ボタンとしての画像です。submit
ボタンの不透明度を0.5
通常の状態にし1.0
て、検索バーがオンのとき:focus
。
ここに私のHTMLがあります:
<form id='searchThis' action='/search' method='get' style='display: inline;'>
<input id='searchBox' name='q' onblur='if(this.value=='')this.value=this.defaultValue;' onfocus='if(this.value==this.defaultValue)this.value='';' style='display:inline;font-family:Segoe UI, Microsoft Tai Le, trebuchet MS,'lucida grande';width: 155px;color:#636363;' type='text' value='Search' vinput=''/>
<input id='submitsearch' alt='Search' height='20px' src='http://1.bp.blogspot.com/-Ab4nALwSEdw/T4LI1pym1LI/AAAAAAAABBA/_oQltx3svas/s320/search.png' style='display:inline; padding-left: 10px; margin-top:1px; position: absolute; opacity:0.5;' title='Search' type='image' width='20px'/>
</form>
しかし、CSS と Javascript のどちらを使用する必要があるのか わかりません。どちらもあまり得意ではありません。
誰でも私を助けることができますか?