<a href="#">hover
<p class="p2">
<p>qwerqwerqwer</p>
</p>
</a>
a:hover .p2{
animation: 0.5s p2 ease-in forwards;
}
a:hover p{
display: block;
}
@keyframes p2{
0%{height: 0; }
100%{height: 200px; }
}
.p2{
width: 200px;
background-color: red;
}
p{
display: none;
}
PHP中文网2017-04-17 11:45:38
a:hover .p2{
animation: 2.5s p2 ease-in forwards;
}
a:hover p{
display: block;
animation: 0.5s p1 ease-in forwards;
animation-delay:2.5s;
}
@keyframes p2{
0%{height: 0; }
100%{height: 200px; }
}
@keyframes p1{
0%{opacity: 0; }
100%{opacity: 1; }
}
.p2{
width: 200px;
background-color: red;
}
p{
opacity: 0;
display: none;
}
天蓬老师2017-04-17 11:45:38
a:hover .p2{
animation: 0.5s p2 ease-in forwards;
}
a:hover p{
animation: 0.5s p ease-in forwards;
}
@keyframes p2{
0%{height: 0; }
100%{height: 200px; }
}
@keyframes p{
0%{opacity:0}
100%{opacity:1}
}
.p2{
width: 200px;
background-color: red;
}
p{
display: block;
opacity:0;
}
Add animation to p