当前位置:JS特效 » 菜单导航 » css动画导航悬停特效demo
css动画导航悬停特效demo
如果您觉得内容不错,请分享:

插件介绍

css动画导航悬停特效demo /* Top and Bottom borders go out */div.topBotomBordersOut a:before, div.topBotomBordersOut a:after{ position: absolute; left: 0px; width: 100%; height: 2px; background: #FFF; content:

浏览器兼容性

浏览器兼容性
时间:2021-11-02 阅读:100
简要教程

【案例简介】

css动画导航悬停特效demo

【案例截图】

【核心代码】


/* Top and Bottom borders go out */
div.topBotomBordersOut a:before, div.topBotomBordersOut a:after
{
    position: absolute;
    left: 0px;
    width: 100%;
    height: 2px;
    background: #FFF;
    content: "";
    opacity: 0;
    transition: all 0.3s;
}

div.topBotomBordersOut a:before
{
    top: 0px;
    transform: translateY(10px);
}

div.topBotomBordersOut a:after
{
    bottom: 0px;
    transform: translateY(-10px);
}

div.topBotomBordersOut a:hover:before, div.topBotomBordersOut a:hover:after
{
    opacity: 1;
    transform: translateY(0px);
}

/* Top and Bottom borders come in */
div.topBotomBordersIn a:before, div.topBotomBordersIn a:after
{
    position: absolute;
    left: 0px;
    width: 100%;
    height: 2px;
    background: #FFF;
    content: "";
    opacity: 0;
    transition: all 0.3s;
}


Top