首页 > Web开发 > 详细

CSS3——制作带动画效果的小图片

时间:2018-06-11 12:43:56      阅读:220      评论:0      收藏:0      [点我收藏+]

还挺有意思的,但是我没有截取动画的软件,就没办法展示我的小动图了,暂时放一个静态的吧:

技术分享图片

main.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动画</title>
    <style type="text/css">
        .box{
            width:249px;
            height:299px;
            margin:50px auto;
            position:relative;
            overflow:hidden;
        }

        .box .pic_info{
            width:249px;
            height:100px;
            background-color: rgba(0,0,0,0.5);
            color:#fff;
            position: absolute;
            left:0;
            top:300px;
            transition:all 500ms ease;
        }

        .box:hover .pic_info{

            top:250px;
        }

        .box .pic_info p{
            text-align: center;
        }
    </style>
</head>
<body>

    <div class="box">
        <img src="images/login.jpg" alt="animal">
        <div class="pic_info"><p>图片说明</p></div>
    </div>

</body>
</html>

 

CSS3——制作带动画效果的小图片

原文:https://www.cnblogs.com/gaoquanquan/p/9166359.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!