下了一个软件:ScreenToGif用来截取动态图片,终于可以展示我的小动图啦,嘻嘻,敲开心!

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

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>

 

相关文章:

  • 2021-07-11
  • 2021-06-12
  • 2021-12-22
  • 2022-12-23
  • 2021-04-20
  • 2021-05-26
  • 2021-07-02
  • 2022-01-24
猜你喜欢
  • 2021-11-06
  • 2022-12-23
  • 2022-01-27
  • 2021-10-19
  • 2021-04-17
  • 2021-05-27
  • 2021-06-28
相关资源
相似解决方案