繁体   English   中英

是否可以在ie7中的子跨度前面显示父跨度的边界?

[英]Is it possible to display parent span's border in front of a child span in ie7?

我想在文字后面加上阴影。 有人看到我在做什么错吗?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >

<style>
.tooltip{
background-color: #ffffe1;
position: absolute;
border-style:solid;
border-width: thin;
border-color: #000000;
z-index: 25;
}

.tooltip_shadow{
background-color: #dadbda;
position: absolute;
width: 100%;
height: 100%;
left: 5px;
top:5px;
z-index: -1;
}
</style>

<SPAN style="TOP: 86px; LEFT: 39px" class=tooltip>
    <SPAN style="Z-INDEX: 15">This is a message!</SPAN>
    <SPAN class=tooltip_shadow>
    </SPAN>
</SPAN>

谢谢Grae

我不知道您实际上是想借助阴影来完成什么,但是我确实知道这段HTML包含很多语法错误。 标准化后,我只是在div下得到一个div,因此它具有灰色背景。 您要完成什么?

这是你想要的?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<style type="text/css">
    .tooltip{
        position: absolute;
    }

    .tooltip_shadow{
        background-color: green;
        position: absolute;
        width: 100%;
        height: 100%;
        left: 5px;
        top: 5px;
    }

    .tooltip_content
    {
        background-color:red;
        position:relative;
        border-style:solid;
        border-width: thin;
        border-color: #000000;
    }
</style>

</head>

<body>
    <div style="top: 86px; left: 39px;" id="wvTooltipdiv_1" class="tooltip">
        <div class="tooltip_shadow"></div>
        <div class="tooltip_content">This is a message!</div>
    </div>
</body>
</html>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM