DIV层 文字 透明
一个div层被应用alpha后,里面的文字变全透明了。参照网上说的设置position没有用。谁有办法解决这个透明问题??
代码如下:
HTML:
<div id= "Main__%WndID%_ " class= "Main ">
<div id= "TopArea__%WndID%_ " class= "TopArea " onmousedown= "ElpisWindow_OnMouseDown( '_%WndID%_ '); " onmouseup= "ElpisWindow_OnMouseUp( '_%WndID%_ '); " onmousemove= "ElpisWindow_OnMouseMove( '_%WndID%_ ') ">
<div id= "LeftTopSite__%WndID%_ " class= "LeftTopSite ">
<div id= "Title__%WndID%_ " class= "Title ";>
<span class= "Title "> <strong> _%WndTitle%_ </strong> </span>
</div>
</div>
<div id= "MiddleTopSite__%WndID%_ " class= "MiddleTopSite ">
</div>
<div id= "RightTopSite__%WndID%_ " class= "RightTopSite ">
</div>
</div>
<div id= "MiddleArea__%WndID%_ " class= "MiddleArea ">
<div id= "LeftVerticalSite__%WndID%_ " class= "LeftVerticalSite ">
</div>
<div id= "RightVerticalSite__%WndID%_ " class= "RightVerticalSite ">
</div>
<div id= "WorkArea__%WndID%_ " class= "WorkArea " ">
</div>
</div>
<div id= "BottomArea__%WndID%_ " class= "BottomArea ">
<div id= "LeftBottomSite__%WndID%_ " class= "LeftBottomSite ">
</div>
<div id= "MiddleBottomSite__%WndID%_ " class= "MiddleBottomSite ">
</div>
<div id= "RightBottomSite__%WndID%_ " class= "RightBottomSite ">
</div>
</div>
</div>
CSS:
div.Main
{
position:absolute;
z-index:100;
width:500px;
height:300px;
left: 361px;
top: 215px;
filter:progid:dximagetransform.microsoft.alpha(opacity=65);
display:none;
}
div.TopArea
{
position:absolute;
width:100%;
height:35px;
left:0px;
top:0px;
}
div.LeftTopSite
{
position:absolute;
width:215px;
height:35px;
left:0px;
top:0px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src= 'WindowBaseLibaray/Theme/Default/Skin/LeftTopSite.png ',sizingMethod= 'image ');
}
div.Title
{
position:relative;
width:100%;
height:15px;
left:10px;
top:6px;
}
span.Title
{
position:static;
font-size: 8pt;
font-family: Tahoma;
color: #000000;
}
div.MiddleTopSite
{
position:absolute;
width:auto;
height:35px;
padding-left:215px;
padding-right:0px;
left:215px;
right:83px;
background-color:#ffffff;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src= 'WindowBaseLibaray/Theme/Default/Skin/MiddleTopSite.png ',sizingMethod= 'scale ');
}
div.RightTopSite
{
position:absolute;
width:83px;
height:35px;
top:0px;
right:0px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src= 'WindowBaseLibaray/Theme/Default/Skin/RightTopSite.png ',sizingMethod= 'Image ');
}
div.MiddleArea
{
position:absolute;
width:auto;
height:auto;
top:35px;
bottom:18px;
left:0px;
right:0px;
padding-top:35px;
padding-bottom:18px;
padding-left:0px;
padding-right:0px;
background-color:#ffffff;
}
div.WorkArea
{
position:absolute;
width:auto;
height:auto;
top:5px;
left:21px;
right:21px;
bottom:0px;
padding:0px 0px 0px 0px;
}
div.LeftVerticalSite
{
position:absolute;
width:16px;
height:100%;
left:0px;
top:0px;
bottom:0px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src= 'WindowBaseLibaray/Theme/Default/Skin/LeftVerticalSite.png ',sizingMethod= 'scale ');
}
div.RightVerticalSite
{
position:absolute;
width:21px;
height:100%;
right:0px;
top:0px;
bottom:0px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src= 'WindowBaseLibaray/Theme/Default/Skin/RightVerticalSite.png ',sizingMethod= 'scale ');
}
div.BottomArea
{
position:absolute;
width:100%;
height:18px;
left:0px;
bottom:0px;
}
div.LeftBottomSite
{
position:absolute;
width:16px;
height:18px;
left:0px;
bottom:0px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src= 'WindowBaseLibaray/Theme/Default/Skin/LeftBottomSite.png ',sizingMethod= 'Image ');
}
div.MiddleBottomSite
{
position:absolute;
width:auto;
height:18px;
left:16px;
bottom:0px;
right:21px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src= 'WindowBaseLibaray/Theme/Default/Skin/MiddleBottomSite.png ',sizingMethod= 'scale ');
}
div.RightBottomSite
{
position:absolute;
width:21px;
height:18px;
bottom:0px;
right:0px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src= 'WindowBaseLibaray/Theme/Default/Skin/RightBottomSite.png ',sizingMethod= 'Image ');
}
[解决办法]
mark,等高人讲解
------解决方案--------------------
参考:
http://www.v-ec.com/dh20156/article.asp?id=10
[解决办法]
子层使用相对定位,行如:
<div> 父层 </div>
<div> 子层 </div>
[解决办法]
使用兩個層