我正在開發一個移動網站,並在iPhone和Android手機上進行測試。 我改變了使用CSS在頁面上的選擇框的外觀。我如何設計Android手機上的select元素?
這在iPhone瀏覽器中顯示效果很好,但在Android中不能正確應用樣式。 原始下拉箭頭仍然存在(並且由於高度屬性而被垂直拉伸)。
有什麼辦法告訴瀏覽器如何在Android設備上設置這個元素的樣式?還是不支持?
這裏是我的代碼示例:
HTML:
<div class="filter-group">
<select class="bigInput" id="f_eventWho" name="f_eventWho" tabindex="1">
<option id="f_public" selected="selected">For Everyone</option>
<option id="f_private">By invitation</option>
<option id="f_both">All Gatherings</option>
</select>
</div>
CSS:
.bigInput
{width: 125px;
height: 50px;
background-size: 15px;
background: rgb(159, 209, 225) url(../img/small_down_arrow_20.png) no-repeat right;
border: none;
margin: 5px;
font-size: 14px;
}
它們將根據瀏覽器/操作系統/設備進行樣式設置,這與您無法更改單選按鈕外觀的方式相同。 –