Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a web page that have background-image in it. After that, there's a combo box for filtering some content. I want to create this select - option background being transparent. I've read many result at google to use select option at CSS, but it didn't work. I've create a fiddle in here : http://jsfiddle.net/25CQE/5 For example and as You can see, the option background is not transparent. So, any idea how to solve that? Or it cannot be done by CSS?

Sorry for my bad English

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
572 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you want to make it fully transparent, than use

select {
    border: 1px solid #fff;
    background-color: transparent;
}

Demo


If you are looking to have semi-transparent background color, than you can use rgba() where a stands for alpha

select {
    border: 1px solid #fff;
    background-color: rgba(255,255,255,.5);
    padding: 5px;
}

Demo 2


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...