채택완료

select ie css 관련 질문입니다.

코드는 아래와 같습니다.

Copy
<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta http-equiv="X-UA-Compatible" content="ie=edge">

<title>Document</title>

 

<style>

 

select {

height: 30px;

color: #000000;

border: 1px solid #cccccc;

border-radius: 3px;

-webkit-appearance: none; /* 화살표 없애기 for chrome*/

-moz-appearance: none; /* 화살표 없애기 for firefox*/

appearance: none; /* 화살표 없애기 공통*/

box-sizing: border-box;

outline: none;

background-color: #ffffff;

white-space: pre;

-webkit-rtl-ordering: logical;

cursor: default;

}

select::-ms-expand {

display: none; /* 화살표 없애기 for IE10, 11*/

}

:root select{padding:0 0 0 7px}


 

select {

top:0;bottom:0;right:0;width:27px;background:url(/images/auction/select_white.gif) no-repeat 100% 0;content:""

}



 

select {

border-radius: 0px;

border-color: rgb(169, 169, 169);

}



 

.styled {

width:70px;

}






 

</style>

 

</head>

<body>

 

<select id="color" title="select color" class="styled">

<option selected="selected">color</option>

<option>red</option>

<option>blue</option>

<option>yellow</option>

<option>black</option>

</select>




 

</body>

</html>
 

ie9, 크롬, 파이어폭스 같은형태로 보입니다.

그런데 

ie에서 셀렉트 하면 파란색으로 백그라운드가 생김니다.

다른브라우저에서는 파란색이 없습니다.

ie  에서 선택후 파란색이 안보이게 하는 방법이 있나요?

조언 부탁드립니다.

|

답변 1개 / 댓글 1개

채택된 답변
+20 포인트
Copy
select:focus::-ms-value {background-color: white; color:#000;}

답변에 대한 댓글 1개

감사합니다. ^^~

답변을 작성하려면 로그인이 필요합니다.