常见鼠标经过div边框动画

所属分类:UI,其他-悬停,动画效果

 48266  914  查看评论 (50)
分享到微信朋友圈
X
常见鼠标经过div边框动画 ie兼容6

更新时间:2017/12/30 上午11:31:00

更新说明:改变调用方式如:

$(".num2").num({Type:'num2',Color:'#ff0000',speed:'300'});
  • Type :  边框动画方式

  • Color :  边框颜色

  • speed :  动画速度


更新时间:2017/9/12 下午3:42:38

更新说明:性能改进,没那么卡


改变div宽高不影响效果。引入divhover.js文件和jq文件。直接调用:如:$(".num1").num1();(第一次写插件,多多包涵)

相关插件-悬停,动画效果

数十次css3鼠标悬停特效

鼠标移上去,界面显示的多种方式,各种css3动画
  悬停
 34323  838

鼠标滑过特效

模块变暗,出现遮罩层,12种炫酷的CSS3鼠标滑过图片遮罩层动画特效.
  悬停
 41088  528

60种css3鼠标悬停效果

一款使用的效果,数遍悬停会出现相应图片的简介
  悬停
 58012  928

纯CSS3 可感知方向 3D盒子翻转动画(原创)

感应鼠标进入方向,向不同的方向翻转
  悬停
 23045  333

讨论这个项目(50)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    童遥 0
    2023/5/21 11:00:03
    很好用 感谢po主
    回复
    junyi5d 0
    2019/7/23 16:01:32
    最好还是用CSS3写吧。。 回复
    指尖微凉的星光 0
    2019/5/9 16:57:06
    为啥我啥效果都没看到 回复
    栀子 0
    2019/1/11 11:57:52
    bug太多了,this指向有问题,鼠标移动上去边框还没展示完,动画结束了,一脸懵逼。
    回复
    Young battlefield。 0
    2018/10/9 9:55:19
    986217527@qq.com跪求大佬发一份 回复
    予我心安° 0
    2018/9/20 10:43:05
    兄弟,引入后比较卡,没法正常使用。
        microsoftvs0
        2018/9/20 11:47:32
        我这里一点都不卡
    回复
    周为止 0
    2018/6/11 14:34:11
    360没有效果呀,有办法兼容吗项目最后一步了 在线等
        总督sir0
        2018/6/18 20:13:54
        应该会有的呀
    回复
    "白"色禁药 0
    2018/5/21 23:10:45
    Prince 1
    2018/4/20 15:21:42

    兄弟 有一个很大的bug  你这个this指针指向不明确啊 多个同名类调用你这个方法就炸掉了  还有最好是innerWidth 和 innerHeight  改了其中一个

    function num3() {
        // top边框
        var divTop = "<div style='" + becurr + "top:-2px;left:-2px;width:0px;height:2px' class='divTop'></div>";
    
        // right边框
        var divRight = "<div style='" + becurr + "top:-2px;right:-2px;width:2px;height:0px;' class='divRight'></div>";
    
        // Bottom边框
        var divBottom = "<div style='" + becurr + "bottom:-2px;right:-2px;width:0px;height:2px' class='divBottom'></div>";
    
        // Left边框
        var divLeft = "<div style='" + becurr + "bottom:-2px;left:-2px;width:2px;height:0px;' class='divLeft'></div>";
        _this.hover(function() {
            var n1 = $(this).innerWidth();
            var h1 = $(this).innerHeight();
            var el = $(this)
            el.append(divTop, divRight, divBottom, divLeft);
            var itTopBottom = $(this).find('.divTop,.divBottom'),
                itRightLeft = $(this).find('.divLeft,.divRight');
            itTopBottom.stop().show().animate({
                width: n1 + 3.5
            }, options.speed);
            itRightLeft.stop().show().animate({
                height: h1 + 3.5
            }, options.speed);
        }, function() {
            var itTopBottom = $(this).find('.divTop,.divBottom'),
                itRightLeft = $(this).find('.divLeft,.divRight');
            itTopBottom.stop().show().animate({
                width: 0
            }, options.speed);
            itRightLeft.stop().show().animate({
                height: 0
            }, options.speed, function() {
                itTopBottom.remove();
                itRightLeft.remove();
            });
        })
    }
    回复
    哈哈哈 0
    2018/4/16 16:12:11
    跪求一份(1720726984@qq.com)。多谢各位大佬 回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复