首页 > Web开发 > 详细

css 轮播图

时间:2021-09-07 16:57:38      阅读:22      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html>
<head>
    <title>Slide Image Sample</title>
    <style>
        #container {
            width: 400px;
            height: 300px;
            overflow: hidden;
        }

        #photo {
            width: 1200px;
            animation: switch 5s ease-out infinite;
        }

        #photo > img {
            float: left;
            width: 400px;
            height: 300px;
        }

        @keyframes switch {
            0%, 25% {
                margin-left: 0;
            }
            35%, 60% {
                margin-left: -400px;
            }
            70%, 100% {
                margin-left: -800px;
            }
        }
    </style>
</head>
<body>
    <div id="container">
        <div id="photo">
            <img src="1.png" />
            <img src="2.png" />
            <img src="3.png" />
        </div>
    </div>
</body>
</html>

转自:https://blog.csdn.net/u011848617/article/details/80468463

css 轮播图

原文:https://www.cnblogs.com/2008nmj/p/15237906.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!