zoukankan      html  css  js  c++  java
  • Jquery鼠标悬停按钮图标动态变化效果

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>jQuery仿淘宝icon动画图标特效</title>
    </head>
    <style type="text/css">
    *{padding: 0;margin: 0;}
    #move{ margin: 40px auto; width: 298px; height: 174px; border: 1px solid #ccc; background-color: #F0F0F0;}
    #move a{
            display: inline-block;
            width: 58px;
            height: 25px;
            border: 1px solid #ddd;
            border-radius: 3px;
            background-color: #fff;
            text-align: center;
            margin: 10px 17px;
            position: relative;
            padding-top: 40px;
            color: #9c9c9c;
            font-size: 12px;
            text-decoration: none;
            line-height: 25px;
            overflow: hidden;
    }
    #move a i{
        position: absolute;
        top: 12px;
        left: 0;
        display: inline-block;
        width: 100%;
        text-align: center;
        filter:alpha(opacity=100);
        opacity: 1;
    }
    #move a:hover{
        color: #f00;
    }
    #move img{
        border:none;
        width: 50%;
    }
    </style>
    <script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function(){
            $('#move a').mouseenter(function(){
                $(this).find("i").animate({top:'-25px',opacity:'0'},300,function(){
                    $(this).css({top:'25px'});
                    $(this).animate({top:'12px',opacity:'1'},600)
                });
            })
        })
    </script>
    <body>
    <div id="move">
        <a href="#"><i><img src="images/zhu.png"></i><p>租房</p></a>
        <a href="#"><i><img src="images/zhu2.png"></i><p>租房</p></a>
        <a href="#"><i><img src="images/zhu3.png"></i><p>租房</p></a>
        <a href="#"><i><img src="images/zhu4.png"></i><p>租房</p></a>
        <a href="#"><i><img src="images/zhu.png"></i><p>租房</p></a>
        <a href="#"><i><img src="images/zhu2.png"></i><p>租房</p></a>
    </div>
    </body>
    </html>
  • 相关阅读:
    JMM内存模型
    APUE习题8.7
    整型和字符数组之间的转换(略带进制的转化)
    数据结构学习——shell排序的C语言实现
    Unix环境高级编程学习笔记——fcntl
    Unix环境高级编程学习笔记——dup
    链表
    计算机数值表示
    整数位运算相关操作
    win和linux下控制台界面中停顿X秒的方式
  • 原文地址:https://www.cnblogs.com/sj1988/p/7124236.html
Copyright © 2011-2022 走看看