Select tag: Hide native arrows of IE 10, 11 in CSS / CSS로 Select 태그의 네이티브 화살표 숨기기

 Hide native arrows of IE 10, 11 in CSS

/* IE 10, 11의 네이티브 화살표 숨기기 */
select::-ms-expand {
  display: none;
}

/*select 태그 네이티브 화살표 숨기기*/
select {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}


code practice
------------------------------------------------
<!DOCTYPE html>
<html>
<head>
<style>
/* IE 10, 11의 네이티브 화살표 숨기기 */
select::-ms-expand {display: none;}
.favcity-wrapper {position:relative;}
.visuallyhidden {  border: 0;  clip: rect(0 0 0 0);  height: 1px;  margin: -1px;  padding: 0;  position: absolute;  }
select {  -webkit-appearance: none;  -moz-appearance: none;  appearance: none;  border-radius: 0; width:100%;}
label[for=favcity] {  position: relative;  display: block;  }
label[for=favcity] select {  border: 5px solid #000;  background: white;  padding: 7px 20px 7px 20px;  width: 100%;  font-size: 16px;  cursor: pointer;}
label[for=favcity]::after {  content: ' ';  position: absolute;  right: 10px;  top: 1px;  width: 3px;  height: 3px;  display: block; border: solid black;  border-width: 0 3px 3px 0;  display: inline-block;  padding: 3px; transform: rotate(45deg);   -webkit-transform: rotate(45deg);}
label[for=favcity] select::-ms-expand {    display: none;}
</style>
</head>
<body>
<div class="favcity-wrapper">
<label for="favcity" class="visuallyhidden"></label>
<select id="favcity" name="select">
<option value="0">00001</option>
<option value="1">00002</option>
<option value="2">00003</option>
<option value="3">00004</option>
</select>
</div>
</body>
</html>

댓글

이 블로그의 인기 게시물

Lottery in javascript / 자바스크립트로 경품추첨기 만들기

Quick Menu(flying menu) in jQuery / 제이쿼리로 퀵메뉴 바 만들기

Accordion Menu in jQuery / 제이쿼리로 아코디언 메뉴 만들기