案例:CSS案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<style>
5
div.background
6
{
7
  width: 400px;
8
  height: 266px;
9
  background: url('/img/eg_tulip.jpg') no-repeat;
10
  border: 1px solid black;
11
}
12
13
div.transbox
14
{
15
  width: 338px;
16
  height: 204px;
17
  margin:30px;
18
  background-color: #ffffff;
19
  border: 1px solid black;
20
  /* for IE */
21
  filter:alpha(opacity=60);
22
  /* CSS3 standard */
23
  opacity:0.6;
24
}
25
26
div.transbox p
27
{
28
  margin: 30px 40px;
29
}
30
</style>
31
</head>
32
33
<body>
34
35
<div class="background">
36
<div class="transbox">
37
<p>
38
This is some text that is placed in the transparent box.
39
This is some text that is placed in the transparent box.
40
This is some text that is placed in the transparent box.
41
This is some text that is placed in the transparent box.
42
</p>
43
</div>
44
</div>
45
46
</body>
47
</html>