css实现酷炫的右侧悬浮菜单栏效果(代码实例)

本文给大家介绍css如何实现酷炫的右侧悬浮菜单栏效果,有一定的参考价值,有需要的朋友可以参考一下,希望对你们有所帮助。

默认显示效果:

css实现酷炫的右侧悬浮菜单栏效果(代码实例)

鼠标悬浮效果:

css实现酷炫的右侧悬浮菜单栏效果(代码实例)

 

HTML、JS代码如下:

立即学习“前端免费学习笔记(深入)”;

                                                *{margin:0;padding:0;}            body{ color:#333;font:12px/20px Arial,"Microsoft YaHei","宋体",sans-serif; text-align:center; background:#fff;  }            a{text-decoration:none;color:#333;}            .rightNav{ position:fixed; width:140px;  right:0; top:100px; _position:absolute; text-align:left; cursor:pointer; background-image:url(about:blank);  }            .rightNav a{ display:block; position:relative; height:30px; line-height:30px; margin-bottom:2px; background:#fff; padding-right:10px; width:130px; overflow:hidden;  cursor:pointer; right:-110px; }            .rightNav a:hover{ text-decoration:none; color:#39A4DC;  }            .rightNav a:hover em{ background:#00b700}            .rightNav a em{ display:block; float:left; width:30px; background:#39A4DC; color:#fff; font-size:16px; text-align:center; margin-right:10px;}            .rightNav a.new em{ background:#f60;}                                                        //右侧导航            var btb=$(".rightNav");            var tempS;            $(".rightNav").hover(function(){                    var thisObj = $(this);                    tempS = setTimeout(function(){                    thisObj.find("a").each(function(i){                        var tA=$(this);                        console.log(i);                        setTimeout(function(){ tA.animate({right:"0"},200);},50*i);                    });                },200);                    },function(){                if(tempS){ clearTimeout(tempS); }                $(this).find("a").each(function(i){                    var tA=$(this);                    setTimeout(function(){ tA.animate({right:"-110"},200,function(){                    });},50*i);                });                    });                                

总结:以上就是本篇文的全部内容,希望能对大家的学习有所帮助。更多相关教程请访问 CSS视频教程!

相关推荐:

php公益培训视频教程

CSS在线手册

div/css图文教程

以上就是css实现酷炫的右侧悬浮菜单栏效果(代码实例)的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1612373.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
PC端移动端不同屏幕大小下响应式布局
上一篇 2025年12月24日 02:56:38
详解CSS pointer-events属性的使用
下一篇 2025年12月24日 02:56:43

相关推荐

发表回复

登录后才能评论
关注微信