Yazeka
Arama sonuçlarına göre oluşturuldu
CSS'de arama kutusu yapmak için aşağıdaki adımlar izlenebilir:
- HTML ile temel yapıyı oluşturma:
- CSS ile stillendirme:
Örnek bir kod yapısı şu şekilde olabilir 4:
<form> <div id="box"> <input type="text" id="search" placeholder="Ara.."> <i class="fa fa-search"></i> </div> </form>
#box { max-width: 300px; position: relative; } #box .fa-search { position: absolute; top: 14px; left: 12px; font-size: 20px; color: cornflowerblue; } #search { width: 100px; box-sizing: border-box; border: 2px solid cornflowerblue; border-radius: 4px; font-size: 18px; padding: 12px 20px 12px 40px; -moz-transition: width 0.4s ease-in-out; -o-transition: width 0.4s ease-in-out; -webkit-transition: width 0.4s ease-in-out; transition: width 0.4s ease-in-out; } #search:focus { width: 100%; }
5 kaynaktan alınan bilgiyle göre: