注册 登录
编程论坛 WEB前端(UI)

怎么实现 文字不透明啊

shuimei262 发布于 2008-10-18 13:35, 1755 次点击
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
#tt {
    background-color: #FFCC66;
    height: 100px;
    width: 300px;
    z-index: 3;
    position: absolute;
    left: 227px;
    top: 65px;
}
#yy {
    background-color: #009999;
    height: 100px;
    width: 200px;
    display: block;
    z-index: 1;
    position: absolute;
}
#Layer1 {
    position:absolute;
    left:165px;
    top:102px;
    width:72px;
    height:60px;
    z-index:6;
    background-color: #FFCCCC;
    filter:alpha(opacity=50);
}
#u {
    color: #000000;
    position: relative;
}
-->
</style>
</head>
<body>
<div id="Layer1">
      <div id="u">sdfsdfs</div>
</div>
<div id="tt">sadf</div>
<div id="yy">sadfff</div>
</body>
</html>
1 回复
#2
chaiyesong2014-09-06 21:26
回复 楼主 shuimei262
请看CSS手册
1