zoukankan      html  css  js  c++  java
  • 简单的划过动画效果

    <!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>
  • 相关阅读:
    IIS 7.0 下 httpMoudle 失效的问题
    iis 管理员执行 aspnet_iis.exe
    java script 闭包
    c# 多语言实现 与 InitializeCulture
    谈 IIS7.5 Asp.Net模拟用户
    oledb 写入 office2010 以及发布到iis 遇到的奇怪问题总结
    DataTableToExcel
    下拉加载数据
    简单使用TFS管理源代码
    a span做成按钮样式不选中文字
  • 原文地址:https://www.cnblogs.com/wysdddh/p/6029350.html
Copyright © 2011-2022 走看看