css实现三维立体菜单和页面过渡切换动画效果代码

代码语言:html

所属分类:菜单导航

代码描述:css实现三维立体菜单和页面过渡切换动画效果代码,点击菜单可切换不同的页面。

代码标签: css 三维 立体 菜单 页面 过渡 切换 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  
  
  
<style>
body {
    margin: 0;
    padding: 0;
    background-color: rgb(25, 25, 25);
    color: white;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

h1  {
    color: cyan;
}
p {
    color: darkcyan;
}





/*-- MENU --*/
/*-- MENU --*/
/*-- MENU --*/

#menu_label {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    z-index: 90000;
    
    cursor: pointer;

    text-align: center;
    font-size: 30px;
    line-height: 50px;
    color: rgba(0, 255, 255, .5);

    -webkit-transition: all .5s cubic-bezier(0, .5, .25, 1);
    -moz-transition: all .5s cubic-bezier(0, .5, .25, 1);
    transition: all .5s cubic-bezier(0, .5, .25, 1);
}
#menu_label:hover {
    color: cyan;
    text-shadow: 0px 0px 10px cyan;
}

#menu_container {
    position: absolute;
    top: 125px;
    left: -300px;
    width: 200px;
    height: 350px;
    background-color: rgb(0, 90, 90);
    opacity: 0;
    box-shadow: -10px 30px 10px 1px rgba(0, 0, 0, .5);

    z-index: 99999;

    -webkit-transform: skewY(-10deg);
    -moz-transform: skewY(-10deg);
    transform: skewY(-10deg);

    -webkit-transition: all .5s cubic-bezier(0, .5, .25, 1);
    -moz-transition: all .5s cubic-bezier(0, .5, .25, 1);
    transition: all .5s cubic-bezier(0, .5, .25, 1);
}

#menu_container::before {
    content: "";
    position: absolute;
    top: -14px;
    left: -7px;
    width: 100%;
    height: 4%;
    background-color: rgb(0, 110, 110);

    z-index: 99999;

    -webkit-transform: skewX(45deg);
    -moz-transform: skewX(45deg);
    transform: skewX(45deg);
}
#menu_container::after {
    content: "";
    position: absolute;
    top: -7px;
    left: -14px;
    width: 7%;
    height: 100%;
    background-color: rgb(0, 70, 70);

    z-index: 99999;

    -webkit-transform: skewY(45deg);
    -moz-transform: skewY(45deg);
    transform: skewY(45deg);
}

#menu_header {
    width: 100%;
    height: 60px;
    margin-top: -10px;
    margin-left: -100px;
    margin-bottom: 5px;
    box-shadow: -5px -5px 5px 0px rgba(0, 0, 0, .5);
    opacity: 0;

    color: rgba(0, 255, 255, .6);
    text-align: center;
    line-height: 60px;

    background: -webkit-linear-gradient(rgba(0, 139, 139, .5), rgba(0, 0, 0, .6));
    background: -moz-linear-gradient(rgba(0, 139, 139, .5), rgba(0, 0, 0, .6));
    background: linear-gradient(rgba(0, 139, 139, .5), rgba(0, 0, 0, .6));

    -webkit-transform: translateX(5px) translateY(5px);
    -moz-transform: translateX(5px) translateY(5px);
    transform: translateX(5px) translateY(5px);

    -webkit-transition: all .5s ease-out;
    -moz-transition: all .5s ease-out;
    transition: all .5s ease-out;
}

#menu_links a {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 40px;
    margin-left: -100px;
    margin-bottom: 9px;
    background-color: rgba(0, 0, 0, .5);
    box-shadow: -5px -5px 5px 0px rgba(0, 0, 0, .5);
    border-left: solid thin rgba(0, 139, 139, .25);
    opacity: 0;

    color: rgba(0, 255, 255, .6);
    line-height: 40px;
    text-indent: 5px;

    -webkit-transform: translateX(5px) translateY(5px);
    -moz-transform: translateX(5px) translateY(5px);
    transform: translateX(5px) translateY(5px);

    -webkit-transition: all .5s ease-in;
    -moz-transition: all .........完整代码请登录后点击上方下载按钮下载查看

网友评论0