0

问题是,如果我将鼠标悬停在服务上,它必须在下面显示一个 div,默认情况下不显示,但在悬停时它将显示为一个块,实际上我不知道那个 css 所以请帮助我,我有这个所以请帮助我

HTML:

<section class="tmain">
    <div class="Button">
        SERVICES
    </div>
    <div class="Button">
        SERVICES
    </div>
</section>
<div class="ShowMe">
</div>

CSS:

.tmain{
            width:960px;
            margin-left:auto;
            margin-right:auto;
            background-color:#069;
            height:auto;
    }
    .Button{
            padding-bottom:40px;
            padding-top:40px;
            padding-left:30px;
            color:white;
            font-family:Agency FB;
            padding-right:30px;
            background-color:#309;
            font-size:36px;
            margin-left:10px;
            float:left;
    }
    .ShowMe{
            width:960px;
            margin-left:auto;
            margin-right:auto;
            background-color:#3C9;
            height:400px;
            display:none;
            position:relative;
            z-index:-1;
    }

    section.tmain:hover > .ShowMe{
        display:block;
    }
4

1 回答 1

0
   section.tmain:hover + .ShowMe{
        display:block;
    }
于 2013-05-23T02:56:32.767 回答