开发者

non-transparent input text on transparent background

I have a form inside a div with a transparent color. I'd need to have the input texts plain white (non transparent). How can I do it?

Here's some code:

http://jsfiddle.net/d5Xuu/11/

(don't mind the background, it's just 开发者_运维问答a random image I picked for the example)

Thanks


@carlo; may be you have to use use css3 rgba color for your background transparency which is not effect div child elements.

background: rgba(0,0,0,0.3)

for IE use filter

filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000); /* IE 6 & 7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000)"; /* IE8 */

you can generate your rgba filter from here http://kimili.com/journal/rgba-hsla-css-generator-for-internet-explorer/


If you use:

opacity: .7

of a div, his sons take the same property.
You can solve using rgba (255,255,255, .7)

http://jsfiddle.net/d5Xuu/19/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜