커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
플로팅버튼 탑버튼 코드오류
[KDC] 창업이 처음이어도 쉽게 배우는 노코드 웹개발 창업
2주차
북마크
김*연
댓글
4
추천
0
조회수
9
조회수
9
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.



아무리 코드수정해달라해도

탑버튼이 작동을 안해요!

최상단으로 이동하지않아요~


보고 계신 화면 전체를 캡처해 주시면, 튜터님들이 빠르게 상황을 이해할 수 있어요.




작성한 코드 및 에러 메세지

<!DOCTYPE html>

<html lang="ko">

<head>

  <meta charset="UTF-8">

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

  <title>Floating Button</title>

  <style>

    body {

      height: 2000px; /* 페이지 길이 추가 */

    }

    .floating-button {

      position: fixed;

      bottom: 80px;

      right: 20px;

      width: 60px;

      height: 60px;

      background-color: #007bff;

      color: white;

      border: none;

      border-radius: 50%;

      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

      cursor: pointer;

      font-size: 24px;

      display: flex;

      align-items: center;

      justify-content: center;

      transition: background-color 0.3s ease, transform 0.3s ease;

      z-index: 1000;

    }

    .floating-button:hover {

      background-color: #0056b3;

      transform: scale(1.1);

    }

    @media (max-width: 768px) {

      .floating-button {

        width: 50px;

        height: 50px;

        font-size: 20px;

      }

    }

  </style>

</head>

<body>

  <button id="topButton" class="floating-button">▲</button>


   

</body>

</html>


취소
 공유
취소
댓글 0
댓글 알림
나의얼굴