2011-05-31 207 views
4

選擇用於按鈕正常工作:CSS選擇選擇

input[type="submit"] 
{ 
    background:#efefef; 
    width:auto; 
    padding:5px; 
    color:#666; 
    font-size:16px; 
    font-weight:bold; 
    padding:5px 15px; 
} 

但我似乎無法得到任何的下拉框工作,這不起作用:

input[type="select"] 
{ 
    background:#000; 
} 

上午我正確選擇它?你能這樣做嗎?

回答

20

試試這個:

select { 
    background:#000; 
} 

據我所知,沒有<input type="select" />,只是<select></select>

+1

Godamn brain fart週二早上,謝謝。 – 2011-05-31 10:28:40

1

select NOT input [type = select] - 瀏覽器提供不同的選擇元素樣式的功能,所以請耐心等待