Question: I have a div tag contain text:

```
<div id="XXX" class="xxx">
    fffsdssfdf
</div>

```

And the CSS like this:

```
.xxx{
opacity :50;
}

```

But the Text doesn't opacity.

Answer: 
For cross browser opacity, you want:

```
{ 
    -moz-opacity:.50; 
    filter:alpha(opacity=50); 
    opacity:.50; 
}

```
For those browsers supporting [RGBA](http://www.css3.info/introduction-opacity-rgba/):

```
<!DOCTYPE html>

<html>
<head>
<style type="text/css">
h1 {
  color: rgba(255, 0, 0, .5/* opacity */);
}
</style>
</head>
<body>

<h1>RED</h1>

</body>
</html>

```