빨간색 버튼 코드

깜박이는 이동 버튼


 <!-- 빨간 깜빡 버튼 -->
<!DOCTYPE html>

<html lang="ko">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>깜박이는 이동 버튼</title>

    <style>

        body {

            display: flex;

            justify-content: center;

            align-items: center;

            min-height: 100vh;

            margin: 0;

            background-color: #f0f0f0; /* 배경색 설정 */

        }



        .blinking-button {

            background-color: red; /* 빨간색 배경 */

            color: yellow; /* 노란색 글자 */

            padding: 15px 30px;

            font-size: 24px;

            font-weight: bold;

            border: none;

            border-radius: 10px; /* 둥근 모서리 */

            cursor: pointer;

            outline: none; /* 클릭 시 나타나는 아웃라인 제거 */

            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 그림자 효과 */



            /* 깜박거리는 애니메이션 */

            animation: blink 1s infinite alternate; /* 1초 간격으로 무한 반복, 부드럽게 */

        }



        @keyframes blink {

            0% { opacity: 1; } /* 시작점: 완전히 보임 */

            100% { opacity: 0.3; } /* 끝점: 30% 투명하게 */

        }



        .blinking-button:hover {

            opacity: 0.8; /* 호버 시 약간 투명도 조정 */

            transition: opacity 0.3s ease;

        }

    </style>

</head>

<body>



    <button class="blinking-button" id="myBlinkingButton">

        ㅡㅡ제목 텍스트 ㅡㅡ

    </button>



    <script>

        // JavaScript 코드 시작

        document.addEventListener('DOMContentLoaded', function() {

            const button = document.getElementById('myBlinkingButton');



            button.addEventListener('click', function() {

                // 여기에 이동할 주소를 입력하세요.

                // 예: 'https://www.google.com' 또는 'another-page.html'

                window.location.href = 'ㅡㅡ주소 작성 ㅡㅡ';

            });

        });

        // JavaScript 코드 끝

    </script>



</body>

</html>
<!-- 빨간 깜빡 버튼 끝 -->