*,*:before,*:after {
    box-sizing: border-box;
}

:after {
    content: "";
}

section {
    position: relative;
    left: 100px;
}


nav {
    z-index: 9999;
    float: left;
    position: absolute;
    top: -5px;
    left: 0;
    background: transparent;
}

nav ul {
    text-align: center;
}

nav ul li {
    position: relative;
    width: 70px;
    cursor: pointer;
    /* 反转前的颜色 */
    background: #ffffff;
    text-transform: uppercase;
    transition:all .4s ease-out;
}

nav ul li:after {
    position: absolute;
    /* 反转后的颜色 */
    background: #ececec;
    /*color: #16baaa;*/
    top:0;
    left: 70px;
    width: 70px; height: 100%;
    opacity:.5;
    transform: perspective(400px) rotateY(90deg);
    transform-origin: 0 100%;
    transition:all .4s ease-out;
}

nav ul li:nth-child(1):after {
    content: "首页";
    line-height: 88px;
}
nav ul li:nth-child(2):after {
    content: "官方论坛";
    line-height: 88px;
}
nav ul li:nth-child(3):after {
    content: "作者博客";
    line-height: 85px;
}
nav ul li:nth-child(4):after {
    content: "联系我们";
    line-height: 70px;
}

nav ul li:hover {
    transform: translateX(-70px);
}

nav ul li:hover:after {
    opacity: 1;
    transform: perspective(400px) rotateY(0deg) scale(1) ;
}


nav ul li > div {
    display: inline-block;
    padding: 25px 0;
    background: transparent;
}

nav ul li div { position: relative; }

.roof {
    width: 0;
    height: 0;
    top:2px;
    border-style: solid;
    border-width: 0 21px 15px 21px;
    /*房子顶部颜色*/
    border-color: transparent transparent #bbbbbb transparent;
}

.roof-edge {
    position: absolute;
    z-index: 20;
    left: -17px;
    top: 3px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 17px 12px 17px;
    /*底色*/
    border-color: transparent transparent #ffffff transparent;
}
/*white triangle over red triangle*/
.roof-edge:after {
    position: absolute;
    left: -14.5px;
    top: 3px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 14.5px 10px 14.5px;
    /*房子头部颜色*/
    border-color: transparent transparent #bbbbbb transparent;
}

.front {
    position: relative;
    top: 3px;
    width: 28.5px;
    height: 20px;
    margin: 0 auto;
    /*房子主体颜色*/
    background: #bbbbbb;
}
/*door*/
.front:after {
    position: absolute;
    /*底色*/
    background: #ffffff;
    width: 11px;
    height: 13px;
    bottom: 0;
    left:9px;
}

/*/// About me ////*/

.head {
    width: 32px;
    height: 35px;
    /*头顶颜色*/
    background: #bbb;
    border-radius:8px;
}
/*mouth*/
.head:after {
    width: 4px;
    height: 10px;
    /*嘴的颜色*/
    background: #ffffff;
    position: absolute;
    border-radius:4px 0 0 4px;
    top:21px;
    left: 14px;
    transform:rotate(270deg);
}

.eyes {
    width: 8px;
    height: 5px;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 5px;
    /*左眼的颜色*/
    background: #ffffff;
}
/*right eye*/
.eyes:after {
    width: 8px;
    height: 5px;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 14px;
    /*右眼颜色*/
    background: #ffffff;
}

.beard {
    width: 32px;
    height: 17px;
    background: #bbb; /**嘴的颜色*/
    border:2px solid white;
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius:0 0 8px 8px;
}
/*nose*/
.beard:after {
    position: absolute;
    top:-2px;
    left: 11px;
    background: white;
    width:6px;
    height: 4px;
    border-left:1px solid #bbb;/**鼻子的颜色*/
    border-right:1px solid #bbb;/**鼻子的颜色*/
}

/*//work//*/

.paper {
    position: relative;
    height:32px;
    width: 29px;
    /*纸张底色*/
    background: #bbb;
    border:2px solid #bbbbbb;
}

/*window*/
.paper:after {
    position: absolute;
    top:1px;
    left: 0;
    width: 25px;
    height: 29px;
    background: #bbb;/*纸张底色*/
    border-top:4px solid #ffffff;/*内部颜色*/
}

.lines {
    position: absolute;
    top: 36px;
    left: 5px;
    width: 11px;
    /*内部横条颜色*/
    box-shadow: 0 0 0 1px #fff;
}

.lines:after {
    position: absolute;
    top: 4px;
    left: 3px;
    width: 14px;
    /*内部横条颜色*/
    box-shadow: 0 0 0 1px #fff;
}

.lines:nth-child(2) {
    position: absolute;
    top: 44px;
    left: 8px;
    width: 11px;
}

.lines:nth-child(2):after {
    position: absolute;
    top: 4px;
    left: -3px;
    width: 11px;
}

.lines:nth-child(3) {
    position: absolute;
    top: 52px;
    left: 8px;
    width: 14px;
}

.lines:nth-child(3):after {
    display: none;
}

/*//mail //*/

.mail-base {
    position: relative;
    width: 32px;
    height: 18px;
    /*信封下面颜色*/
    background: #bbbbbb;
}

.mail-top {
    position: absolute;
    z-index: 20;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform: rotate(180deg);
    border-style: solid;
    border-width: 0 16px 11px 16px;
    /*信封中间颜色*/
    border-color: transparent transparent #ffffff transparent;
}

.mail-top:after {
    position: absolute;
    z-index: 20;
    left: -16px;
    top: 3px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 16px 9px 16px;
    /*信封上面颜色*/
    border-color: transparent transparent #bbb transparent;
}