1

首先对我糟糕的英语感到抱歉:

好吧,我有这个 CSS

span.favoritos {position:absolute;left:550px;visibility:hidden;}
span.favtitle {position:absolute;top:-20px;left:450px;visibility:hidden;background: rgba(81,81,81, .9);color:#f2f2f2;padding:2px 4px 2px 4px;width:115px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
.favoritos a {display:block;
width:24px;
height:24px;
text-indent:-9999px;
background:url(img/sprite2.png) -21px -324px no-repeat;
-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}
.favoritos a:hover {
background:url(img/sprite2.png) -21px -283px no-repeat;}
.favsave a {display:block;
width:24px;
height:24px;
text-indent:-9999px;
background:url(img/sprites.png) -121px -108px no-repeat;
border:1px #ececec solid;
-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
.content:hover span.favoritos {visibility:visible;}
.content:hover span.favdel {visibility:visible;}
.favoritos:hover span.favtitle {visibility:visible;}

而这个 HTML

 <div class="content">
        <span class="favtitle">Añadir a favoritos</span>
                        <span class="favoritos"><a title="Guardar en favoritos" href="#oferta-guardada">favoritos</a></span>
    </div>

但是当我将鼠标悬停在<span class="favoritos"></span>不起作用时,它不会显示<span class="favtitle">

我不知道为什么。

任何人都可以帮助我,好吗?

4

1 回答 1

0

span.favtitle不是.favoritos:hover您试图在最后一个选择器中解决它的后代。

于 2012-09-24T12:28:44.460 回答