• 简单的划过动画效果


    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <style type="text/css" media="screen">
            .border_animation{position:relative;272px;height:182px;margin:50px auto; /*border:1px solid black;*/}
            .border_animation .img_wrap{270px;height:180px;border:1px solid #eee}
            .border_animation .border_top{position:absolute;height:1px;0;font-size:0;background:#000;top:0;left:0;}
            .border_animation .border_right{position:absolute;height:0px;1px;font-size:0;background:#000;bottom:0;right:0;}
            .border_animation .border_bootom{position:absolute;height:1px;0px;font-size:0;background:#000;right:0;bottom:0;}
            .border_animation .border_left{position:absolute;height:0px;1px;font-size:0;background:#000;left:0;top:0;}
        </style>
    </head>
    <body>
        <div class="border_animation">
            <div class="border border_top"></div>
            <div class="border border_right"></div>
            <div class="border border_bootom"></div>
            <div class="border border_left"></div>
            <div class="img_wrap">
                <a target="_blank" href="#">
                    <img width="270" height="180" src="qq.png" />
                </a>
            </div>
        </div>
    <script src="jquery.js"></script>
    <script>
    $(function(){
        $(".border_animation").hover(
            function(){
                $(".border_top").animate({'width':'272px'},500);
                $(".border_right").animate({'height':'182px'},500);
                $(".border_bootom").animate({'width':'272px'},500);
                $(".border_left").animate({'height':'182px'},500);
            },
            function(){
                $(".border_top").animate({'width':'0'},500);
                $(".border_right").animate({'height':'0'},500);
                $(".border_bootom").animate({'width':'0'},500);
                $(".border_left").animate({'height':'0'},500);
            })
    
    });
    
    </script>
    </body>
    </html>
  • 相关阅读:
    python读写操作(txt, mat, xls, etc文件)
    开发linux版QQ就是支持未来的国产操作系统
    为知笔记linux绿色版的快速调用
    数学物理中的常见误区
    markdown语法小结
    信息爆炸时代的知识获取
    matlab: 数据的读写
    APS期刊投稿准备: REVTex格式
    markdown基本语法
    常见的数学关系
  • 原文地址:https://www.cnblogs.com/wysdddh/p/6029350.html
Copyright © 2020-2023  润新知