나는 선택을 다시하고 있는데, 드롭 다운을 처음 클릭 할 때 옵션 목록에서 현재 선택된 것을 가진 옵션이 표시됩니다. CSS에서 다르게 스타일을 지정하려면 어떻게합니까? 나는 백그라운드를 빨간색으로 바꿀 수있는 옵션을 위해 CSS를 가져 왔으며, 이것이 무엇이든 동일한 스타일을 사용하고 싶습니다.선택 옵션 초점 텍스트 변경하기 CSS
나는 옵션을 시도했다 : 초점과 그 작동하지 않았다.
아이디어가 있으십니까? 이 질문에 대한 답 그러나 이것은 내 문제를 해결하는 경우
.select-wrapper { background:url(images/ui-sprite-sheet.png) no-repeat 0 0 transparent; height:32px; width:193px; }
.select-wrapper:hover { background-position:0 -32px !important; }
.select-wrapper .selected { margin:-24px 20px; display:block; color:#4d4c4c !important; font-size:14px; width:153px; }
.select-wrapper SELECT { position:relative; opacity:0; height:32px; width:183px; left:5px; top:-3px; }
.select-wrapper OPTION { color:#4d4c4c !important; padding:3px; background:#fff;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff),color-stop(1, #ddd));
background: -moz-linear-gradient(center top, #fff 0%, #ddd 100%);
background: -o-linear-gradient(center top, #fff 0%, #ddd 100%);
background: -ms-linear-gradient(center top, #fff 0%, #ddd 100%);
background: linear-gradient(center top, #fff 0%, #ddd 100%); }
.select-wrapper OPTION:hover { color:#fff !important; background-color:#660000 !important;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #660000),color-stop(1, #2e0000)) !important;
background: -moz-linear-gradient(center top, #660000 0%, #2e0000 100%) !important;
background: -o-linear-gradient(center top, #660000 0%, #2e0000 100%) !important;
background: -ms-linear-gradient(center top, #660000 0%, #2e0000 100%) !important;
background: linear-gradient(center top, #660000 0%, #2e0000 100%) !important;
}
IE8에서는 작동하지만 다른 것은 없습니다. 나는 또한 선택을위한 전체 드롭 다운의 스타일링이 파이어 폭스와 다른 것에서 만 작동한다는 것을 깨달았다. 그건 안돼. 나는 이것을 다시 생각할 필요가있다. – Anna