div里有个p标签,想a:hover时先div展开完了再显示p可以怎么做?
橱窗的光
橱窗的光 2017-03-27 09:20:49
0
2
1655
<a href="#">hover        
    <div class="div2">
        <p>qwerqwerqwer</p>
    </div>
</a>
a:hover .div2{
        animation: 0.5s div2 ease-in forwards;    
    }
    a:hover p{
        display: block;
    }
    @keyframes div2{
        0%{height: 0; }
        100%{height: 200px; }
    } 
    .div2{
        width: 200px;
        background-color: red;
        
    }
    p{
        display: none;
    }
橱窗的光
橱窗的光

reply all(2)
数据分析师

There is a p tag in a div. When I want to do a:hover, what can I do if the div is expanded first and then the p tag is displayed? -PHP Chinese website Q&A-There is a p tag in a div. When I want to do a:hover, what can I do if the div is expanded first and then the p is displayed? -PHP Chinese website Q&A

Let’s take a look and learn.

迷茫
a:hover .div2{        animation: 2.5s div2 ease-in forwards;    
    }
    a:hover p{        display: block;        animation: 0.5s div1 ease-in forwards;    
        animation-delay:2.5s;    }
    @keyframes div2{
        0%{height: 0; }
        100%{height: 200px; }
    } 
    @keyframes div1{
        0%{opacity: 0; }
        100%{opacity: 1; }
    } 
    .div2{        width: 200px;        background-color: red;        
    }
    p{        opacity: 0;        display: none;    }


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template