码迷,mamicode.com
首页 > Web开发 > 详细

CSS3--底部菜单上拉效果

时间:2019-04-06 19:16:39      阅读:757      评论:0      收藏:0      [点我收藏+]

标签:repeat   底部   info   :hover   上拉   har   abs   rgb   set   

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>底部菜单上拉效果</title>
        <style>
            *{
                margin: 0;
            }
            .wrap{
                width: 1200px;
                margin: 50px auto;

            }
            .wrap .item{
                width: 120px;
                height: 120px;
                border: 1px solid #ddd;
                background: url(img/1.jpg) no-repeat;
                background-size:100% 100%;
                position: relative;
                overflow: hidden;
            }
            .wrap .item .info{
                position: absolute;
                width: 100%;
                height: 40px;
                background:rgba(0,0,0,0.5);
                color: #fff;
                bottom: -40px;
                left: 0;
                transition: 0.75s all;
            }
            .wrap .item:hover .info{
                bottom: 0;
            }
        </style>
    </head>
    <body>
        <div class="wrap">
            <div class="item">
                <span class="info">斗破苍穹</span>
            </div>
        </div>
    </body>
</html>
---------------------
作者:AsaZyf
来源:CSDN
原文:https://blog.csdn.net/AsaZyf/article/details/83059771
版权声明:本文为博主原创文章,转载请附上博文链接!

CSS3--底部菜单上拉效果

标签:repeat   底部   info   :hover   上拉   har   abs   rgb   set   

原文地址:https://www.cnblogs.com/mmzz3322/p/10662472.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!