# 自定义博客顶栏背景图片
#blogTitle {
  height: 120px;
  clear: both; 
  background-image:url("https://www.cnblogs.com/images/cnblogs_com/haoxinchen/1371047/o_%e6%b5%b7%e8%b4%bc%e7%8e%8b.png");
  background-position:center;
}

.loop-wrap {
    position: relative;
    width: 500px;
    height: 300px;
    margin: 100px auto;
    overflow: hidden;
}

.loop-images-container{
    position: absolute;
    left: 0; top: 0;
    width: 500%; /* 横向排列 5张图片 宽度应为主容器5倍 */
    height: 100%;
    font-size: 0;
}

.loop-image{
    width: 500px;
    height: 300px;
}

.loop-images-container{
    position: absolute;
    left: 0; top: 0;
    width: 500%;
    height: 100%;
    font-size: 0;
    transform: translate(0,0); /* 初始位置位移 */
    animation: loop 10s linear infinite;
}

/* 创建loop动画规则 */
/* 
   轮播5张，总耗时10s，单张应为2s(20%)
   单张切换动画耗时500ms，停留1500ms
*/
@keyframes loop {
    0% {transform: translate(0,0);}
    15% {transform: translate(0,0);} /* 停留1500ms */

    20% {transform: translate(-20%,0);} /* 切换500ms 位移-20% */
    35% {transform: translate(-20%,0);}

    40% {transform: translate(-40%,0);}
    55% {transform: translate(-40%,0);}

    60% {transform: translate(-60%,0);}
    75% {transform: translate(-60%,0);}

    80% {transform: translate(-80%,0);}
    95% {transform: translate(-80%,0);}

    100% {transform: translate(0,0);} /* 复位到第一张图片 */
}

* {
    margin:0;
    padding:0;
}
a{
    text-decoration: none;
}
.container {
    position: relative;
    width: 600px;
    height: 400px;
    margin:100px auto 0 auto;
    box-shadow: 0 0 5px green;
    overflow: hidden;
}
.container .wrap {
    position: absolute;
    width: 4200px;
    height: 400px;
    z-index: 1;
}
.container .wrap img {
    float: left;
    width: 600px;
    height: 400px;
}
.container .buttons {
    position: absolute;
    right: 5px;
    bottom:40px;
    width: 150px;
    height: 10px;
    z-index: 2;
}
.container .buttons span {
    margin-left: 5px;
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: green;
    text-align: center;
    color:white;
    cursor: pointer;
}
.container .buttons span.on{
    background-color: red;
}
.container .arrow {
    position: absolute;
    top: 35%;
    color: green;
    padding:0px 14px;
    border-radius: 50%;
    font-size: 50px;
    z-index: 2;
    display: none;
}
.container .arrow_left {
    left: 10px;
}
.container .arrow_right {
    right: 10px;
}
.container:hover .arrow {
    display: block;
}
.container .arrow:hover {
    background-color: rgba(0,0,0,0.2);
}