zoukankan      html  css  js  c++  java
  • css3 hover效果

    html代码:

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }
        
        a {
            text-decoration: none;
            color: #333;
        }
        
        .box {
            width: 55px;
            height: 55px;
            overflow: hidden;
            display: block;
        }
        
        .box img {
            width: 55px;
            height: 55px;
            display: block;
            border-radius: 5px;
            float: left;
        }
        
        .box i {
            width: 55px;
            height: 55px;
            display: block;
            text-align: center;
            color: #888;
            font-size: 20px;
            line-height: 55px;
            transition: all .3s linear;
            -webkit-transition: all .3s linear;
            -moz-transition: all .3s linear;
            -o-transition: all .3s linear;
            -ms-transition: all .3s linear;
            font: normal 24px/55px Arial, Helvetica, sans-serif;
            background-color: #3F6F12;
        }
        
        .box:hover i {
            height: 0;
            line-height: 150px;
        }
        </style>
    </head>
    
    <body>
        <div class="box">
            <i>1</i>
            <img src="http://pic.2265.com/upload/2017-3/2017331931498082.png" />
        </div>
    </body>
    
    </html>

    效果图:

    hover效果

  • 相关阅读:
    hiho150周
    hdu1011
    hiho1055/hdu1561
    bat脚本启动exe并打开文件后退出 + 中文乱码
    hiho1080
    hiho1079
    java异常处理——基础篇
    找不到要编译的文件——path环境变量配置
    MVC——studying
    轻松搞定EasyUI
  • 原文地址:https://www.cnblogs.com/huanghuali/p/6906470.html
Copyright © 2011-2022 走看看