/* 行背景间隔显示 */
table {
    width: 300px;
    margin: 50px;
}
thead {
    background-color: #000;
    color: #fff;
    text-align: left;
}
tbody tr:nth-child(even) {
    background-color: #ccc;
}
.hot-site {
    color: #f00;
}

/* 输入框过渡 */
/* 输入框伸长了100像素，所以边距左右各缩短50像素 */
input {
    position: relative;
    left: -50px;
    clear: both;
    width: 200px;
    margin: 0 150px;
}
/* 注意上面的 margin: 0 150px; */
/* 注意下面的 margin: 0 100px; */
input:focus {
    width: 300px;
    margin: 0 100px;
}
/* 时间相同以保证动画协调性 */
input:focus {
    -webkit-transition: width 0.7s, margin 0.7s;
    -moz-transition: width 0.7s, margin 0.7s;
    -o-transition: width 0.7s, margin 0.7s;
    transition: width 0.7s, margin 0.7s;
}

/* 轮播图 */
.container {
    overflow: hidden;
    position: relative;
    width: 300px;
    height: 150px;
    margin: 50px;
}
.container div {
    width: 300px;
    height: 150px;
}
#wrap {
    position: relative;
}
nav {
    position: absolute;
    top: 120px;
    left: 40px;
    width: 300px;
    height: 150px;
    text-align: right;
}
a {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: #888;
    text-decoration: none;
    text-align: center;
    line-height: 30px;
    color: #fff;
}

#box-1 {
    position: relative;
    background-color: #f00;
    animation: move1 4s ease-in-out;
    animation-fill-mode: forwards;
}
@keyframes move1 {
    0% {
        left: 0;
    }
    99% {
        left: -300px;
    }
    100% {
        top: 0;
        left: 0;
    }
}

#box-2 {
    background-color: #0f0;
    animation: move2 4s ease-in-out;
    animation-fill-mode: forwards;
}
@keyframes move2 {
    0% {    position: relative;

        top: -150px;
        left: 300px;
    }
    99% {    position: relative;

        top: -150px;
        left: 0;
    }
    100% {
        top: 0;
        left: 0;
    }
}
#box-3 {
    background-color: #00f;
    animation: move3 4s ease-in-out;
    animation-delay: 4s;
    animation-fill-mode: forwards;

}
@keyframes move3 {
    0% {    position: relative;

        top: -300px;
        left: 300px;
    }
    99% {    position: relative;

        top: -300px;
        left: 0;
    }
    100% {
        top: 0;
        left: 0;
    }
}

