CSS3 animation automatically rises from the bottom

Source: Internet
Author: User

 Effect: Red words and backgrounds rise slowly from the bottom



Code
<style>
. Father {
width:300px;
height:280px;
border:1px solid #ccc;
margin:50px Auto;
}
. Father Img{
width:300px;
height:200px;
}
. son{
width:300px;
height:80px;
Overflow:hidden;

}
. son1{
Animation:sport 1s;
Transform:translatey (0px);
width:300px;
height:80px;
Background: #cd0200;
}
@keyframes Sport {
0% {Transform:translatey (80px); opacity:1;}
25% {Transform:translatey (50px); Opacity:1}
50% {Transform:translatey (20px); Opacity:1}
100% {transform:translatey (0px); Opacity:1}
}
h3,p{
Color: #000000;
font-size:13px;
}
h3{
padding:10px 0 10px 10px;
}
</style>
<body>
<div class= "Father" >

<div class= "Son" >
<div class= "Son1" >
Contents content content of content content content of <p> contents </p>
</div>
</div>
</div>
</body>

CSS3 animation automatically rises from the bottom

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.