2017-09-26 1 views
-1

오른쪽에 글자 아이콘 검색 아이콘을 배치하고 싶습니다.페이지의 오른쪽 끝에 glyphicon-searching을 위치시키고 자합니다.

<div id="search" > <i class="glyphicon glyphicon-search" ></i> 
</div> 

내 div에 다른 클래스 이름을 추가하고 스타일을 부동으로 지정하면 해당 작업이 올바르게 작동하지만 해당 클릭 기능이 작동하지 않습니다.

$('#search').click(function(e) { 
    $('#example_filter').show(); 
}); 

답변

0

시도는 CSS 위치

#search{ 
    position:relative; 
    width:/*your element width */ 
    height:/*your element height*/ 
} 
#search glyphicon.glyphicon-search{ 
    position:absolute; 
    left:0px; 
    width:/*your element width */ 
    height:/*your element height*/ 
} 
과 정렬하도록
관련 문제