본문 바로가기
Web/HTML | CSS|JAVASCRIPT

자바스크립트를 사용하지 않은 슬라이드 이미지 만들기(HTML, CSS)

by 싸공 2020. 7. 21.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style scoped>
    body{
        margin0;
        padding0;
        background#8a8989;
    }
    .container{
        width500px;
        height500px;
        margin300px auto;
        backgroundurl(img1.jpg);
        background-repeatno-repeat;
        animation: slider 5s infinite;
    }
    @keyframes slider {
        25%{
            backgroundurl(img1.jpg);
            background-repeatno-repeat;
        }
        50%{
            backgroundurl(img2.jpg);
            background-repeatno-repeat;
        }
        50%{
            backgroundurl(img3.jpg);
            background-repeatno-repeat;
        }
        75%{
            backgroundurl(img4.jpg);
            background-repeatno-repeat;
        }

    }
</style>
<body>
    <div class="container">
    </div>
</body>
</html>