我試圖擺脫在下拉菜單中的選項後面的白色背景的大背景下,到目前爲止,這是我的代碼:樣式下拉
CSS:
select {
margin: 50px;
border: 1px solid white;
background: transparent;
width: 50%;
padding: 5%;
height: 50%;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
select > option
{
color:transparent;
}
.blueLabel
{
background: linear-gradient(to right bottom, #2D3C43 0%,#2D3C43 50%,#243137 50%,#243137 100%);
}
HTML:
<div class = "blueLabel">
<select>
<option>option 1</option>
<option >Kuku</option>
<option>Yeah, why not</option>
<option>I think is = 7</option>
</select>
<div>
我希望它是透明的。問題是,無論我做什麼它仍然是白色的,我無法擺脫它
你的意思是白色背景或白色邊框?背景對我來說是藍色的 – 2015-02-10 02:21:20
當你打開下拉菜單時,它的背景是白色的,因此你看不到文字。我可以把它放在幾種顏色,但不透明 – NicolasZ 2015-02-10 02:22:59
這不適用於iOS – ForceBru 2015-02-10 13:32:55