• HTML5+CSS3-->鼠标经过效果


    鼠标没有经过:

     鼠标经过第三个盒子:

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style type="text/css">
                #maxbox{
                     830px;
                    height: 350px;
                    display: flex;
                    justify-content: space-between;
                }
                #maxbox>div{
                     205px;
                    height: 100%;
                    overflow: hidden;
                    background-size: 830px 100%;
                    position: relative;
                    
                    color: white;
                    cursor: pointer;
                }
                
                #box01{
                    background-image: url(img/homepage-all-vehicles-bg-img.jpg);
                    
                }
                #box02{
                    background-image: url(img/homepage-all-vehicles-bg-img.jpg);
                    background-position:-210px;
                }
                #box03{
                    background-image: url(img/homepage-all-vehicles-bg-img.jpg);
                    background-position:-420px;
                    
                }
                #box04{
                    background-image: url(img/homepage-all-vehicles-bg-img.jpg);
                    background-position:-620px;
                    
                }
                .black{
                     100%;
                    height: 100%;
    
                }
                .minbox>p{
                    font-weight: 900;
                }
                .black:hover{
                    background-color: rgba(0,0,0,.25);
                    
                }
                .black:hover>div{
                transform:translateY(-20px);
                
                }
                .black:hover span{
                color:black;
                background-color:white;
                }
                
                .minbox{
                    position: absolute;
                    bottom:0;
                     100%;
                    height: 150px;
                    /*background-color: lightblue;*/
                    text-align: center;
                }
                .jiantou{
                    margin: 0 auto;
                    display: block;
                     30px;
                    height: 30px;
                    border-radius: 50%;
                    border: white 1px solid;
                    font-size: 16px;
                    line-height: 30px;
                }
            </style>
        </head>
        <body>
            <div id="maxbox">
                <div id="box01">
                    <div class="black">
                        <div class="minbox">
                            <span class="jiantou">></span>
                            <p>轿车</p>
                        </div>
                    </div>
                </div>
                <div id="box02">
                    <div class="black">
                        <div class="minbox">
                            <span class="jiantou">></span>
                            <p>SUV</p>
                        </div>
                    </div>
                </div>
                <div id="box03">
                    <div class="black">
                        <div class="minbox">
                            <span class="jiantou">></span>
                            <p>跑车</p>
                        </div>
                    </div>
                </div>
                <div id="box04">
                    <div class="black">
                        <div class="minbox">
                            <span class="jiantou">></span>
                            <p>MPV</p>
                        </div>
                    </div>
                </div>
            </div>
            
        </body>
    </html>
  • 相关阅读:
    sqlserver,获取调用存储过程返回数据的方法。
    手动为弹窗添加一个阴影背景。
    bootstrap资料链接
    进入Linux救援(rescue)模式的四大法门
    virtual box 5.2.12 扩展包安装
    pypi配置国内开源镜像
    vs2015利用python加载dll调试配置
    ubuntu18安装ubuntu kylin软件中心
    firefox快捷键窗口和标签类
    设置双网卡路由
  • 原文地址:https://www.cnblogs.com/yi-miao-2333/p/11878106.html
Copyright © 2020-2023  润新知