https://codepen.io/paperwiz/pen/BaRQvJN
BaRQvJN
...
codepen.io
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_custom_select
W3Schools online HTML editor
The W3Schools online code editor allows you to edit code and view the result in your browser
www.w3schools.com
attribute 선택
select{
-webkit-appearance: none; /* 화살표 없애기 for chrome*/
-moz-appearance: none; /* 화살표 없애기 for firefox*/
appearance: none; /* 화살표 없애기 공통*/
background: url(img/select.jpg) no-repeat right;
}
select::-ms-expand {
display: none; /* 화살표 없애기 for IE10, 11*/
}
<select required>
<option value="" disabled selected>Select something...</option>
<option value="1">One</option>
<option value="2">Two</option>
</select>
select:required:invalid {
color: gray;
}
option[value=""][disabled] {
display: none;
}
option {
color: black;
}
반응형
'그때 그때 > CSS' 카테고리의 다른 글
ie rowspan border 안보일때 (0) | 2021.11.19 |
---|---|
input date placeholder 없애기, value색 변경 (0) | 2021.07.22 |
border gradient (0) | 2021.02.10 |
text-decoration / MDN (0) | 2021.01.27 |
모바일 터치 touch-action (0) | 2021.01.27 |