2017-05-19 2 views
1

검색 아이콘을 검색 상자 안에 넣고 싶지만 그 아래에 표시하고 있습니다. 여기 는각도가있는 검색 텍스트 안에 소재 아이콘 JS

<section class="example"> 
      <section class="search-container"> 
       <input type="search" id="sampleSearchInput" ><i class="material-icons">search</i> 
      </section> 
     </section> 

CSS 가능성이 잘못 될 수 무엇

input[type="search"] { 
    padding-right:32px; 
} 

.search-container { 
    position:relative; 
    width:20%; 
    margin-left:55%; 

} 

.search-container > input[type="search"] + span { 
    position:absolute; 
    top:12px; 
    right:10px; 
} 

을 코드 - 코드인가?

답변

1

이 당신에게 당신의 CSS를 추가

.material-icons{ 
    position: absolute; 
    top:0; 
}