2014-12-10 5 views

답변

0

이 그 작업을 수행합니다

CSS :

#search { 
    border-bottom: 2px solid purple; 
    width: 500px; 
    padding:2px; 
    color:darkgray; 
    /** removed absolut 4 testing **/ 
} 
.csearch, 
.csearch:active, /** added active and focus to remove highlighting **/ 
.csearch:focus { 
    border:0px; 
    border-bottom: 2px solid purple; 
    width: 500px; 
    padding:2px; 
    color:darkgray; 
    background-color:#ffffff; /** that color of your background OR transparent if image **/ 
    font-size:14px; 
    /** to remove the highlighting when active **/ 
    outline:0px; 
    box-shadow:0px 0px 0px #ffffff; /** or other color/tansparent OR none **/ 
} 

HTML :

<input type="text" size="55" placeholder="Instead of this type of search bar..."> 

<div id="search">.. I want my search bar to look like this </div> 

<input type="text" class="csearch" size="55" placeholder="I'm a search bar :)"> 
+0

감사합니다! 나는 직설적 인 CSS 속성을 놓쳤다. 어쨌든 이제는 또 다른 문제가 있습니다. 입력을 시작하기 위해 막대를 클릭 할 때 막대를 둘러싸는 파란색으로 강조 표시된 상자를 제거 할 수 있습니까? – blurgoon

+0

상자 그림자를 설정할 수 있습니다. 0px 0px 0px #ffffff; 개요 : 0px; 강조 표시를 제거하려면 – UnskilledFreak

관련 문제