- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 18 May 2011 09:56:34 -0700
- To: Ricardo Ferreira <ricardo.ferreira@9tree.net>
- Cc: www-style@w3.org
On Tue, May 17, 2011 at 2:55 PM, Ricardo Ferreira <ricardo.ferreira@9tree.net> wrote: > Hi, > I don't know if anyone have the same "problem", but I think that the > transparency should have some parameter where I could specify that text and > inputs (some elements pre-defined) don't have transparency on it. > For example: > <div style="transparency: 0.5"> > <span>Hi, my name is FOO, what's yours?</span> > <input type="text" name="bar" /> > </div> > > As you can see, the text and the input inside the div will be transparent > too. The only way to get this work is defining the div (in this example), > outside the div define the span and input and positioning the elements with > absolute value.. > Example: > <div style="transparency: 0.5;"></div> > <div style="position: absolute; top: 0;"> > <span>Hi, my name is FOO, what's yours?</span> > <input type="text" name="bar" /> > </div> > > What's your opinion? Is there a way that I don't remembering? The 'opacity' property is a blunt club that should only be used when you really want the entire element to be partially transparent. Like Paul said, if all you want is a transparent background, make a transparent background. Either use a PNG image with transparency, or use the rgba() or hsla() functions to create a partially-transparent background color. ~TJ
Received on Wednesday, 18 May 2011 16:57:22 UTC