Tôi đã xây dựng this fiddle làm ví dụ về những gì tôi đang làm.chọn tùy chọn phông chữ
Điều tôi đang cố gắng thực hiện tốt trong Firefox. Với kích thước phông chữ là 14px khi bạn mở các tùy chọn đã chọn.
Tuy nhiên, hãy xem nó trong Google Chrome nó chọn kích thước phông chữ được thừa kế của 34px.
Tôi lý tưởng tìm các tùy chọn được chọn là kích thước phông chữ 14px.
Điều này có thể thực hiện được không?
Tôi sẵn sàng thực hiện mọi sửa lỗi có liên quan trong jQuery nếu cần.
Cảm ơn
Mã liệt kê dưới đây ......
My CSS là:
.styled-select {
overflow: hidden;
height: 74px;
float: left;
width: 365px;
margin-right: 10px;
background: url(http://i50.tinypic.com/9ldb8j.png) no-repeat right center #5c5c5c;
}
.styled-select select {
font-size: 34px;
border-radius: 0;
border: none;
background: transparent;
width: 380px;
overflow: hidden;
padding-top: 15px;
height: 70px;
text-indent: 10px;
color: #ffffff;
-webkit-appearance: none;
}
.styled-select option.service-small {
font-size: 14px;
padding: 5px;
background: #5c5c5c;
}
HTML Markup:
<div class="styled-select">
<select class="service-area" name="service-area">
<option selected="selected" class="service-small">Service area?</option>
<option class="service-small">Volunteering</option>
<option class="service-small">Partnership & Support</option>
<option class="service-small">Business Services</option>
</select>
</div>
có thể trùng lặp của [? Làm thế nào để tạo kiểu yếu tố lựa chọn một lựa chọn từ khóa của] (http://stackoverflow.com/questions/5887133/how-to -style-a-select-tags-option-element) – TylerH