纯CSS实现的图片切换效果

前端之家收集整理的这篇文章主要介绍了纯CSS实现的图片切换效果前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

下面是编程之家 jb51.cc 通过网络收集整理的代码片段。

编程之家小编现在分享给大家,也给大家做个参考。

<!DOCTYPE html>
<html>
<head>
    <Meta charset="UTF-8">
    <title>CSS3实现轮播图效果</title>
<style>
    @-webkit-keyframes slide {
        0% {
            background-position: 0 0;
        }
        10%,25% {
            background-position: -600px 0;
        }
        35%,50% {
            background-position: -1200px 0;
        }
        60%,75% {
            background-position: -1800px 0;
        }
        85%,100% {
            background-position: 0 0;
        }
    }
    @-moz-keyframes slide {
        0% {
            background-position: 0 0;
        }
        10%,100% {
            background-position: 0 0;
        }
    }
    @-o-keyframes slide {
        0% {
            background-position: 0 0;
        }
        10%,100% {
            background-position: 0 0;
        }
    }
    @keyframes slide {
        0% {
            background-position: 0 0;
        }
        10%,100% {
            background-position: 0 0;
        }
    }
    .slide-Box {
        margin: 0 auto;
        width: 600px;
        height: 400px;
        border: 1px solid #ddd;
        background: url(http://sandBox.runjs.cn/uploads/rs/376/uazzmdfd/bg.png) 0 0 no-repeat;
        -webkit-animation: slide 8s linear infinite;
        -o-animation: slide 8s linear infinite;
        animation: slide 8s linear infinite;
    }
</style>
</head>
<body>
    <div class="slide-Box"></div>
</body>
</html>

以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

猜你在找的CSS相关文章