Menu
Coddy logo textTech

버튼 - II

Coddy의 사이드바 | 프론트엔드 프로젝트 코스 레슨 — 13개 중 11번째.

challenge icon

챌린지

쉬움

#closeSidebarBtn 및 #openSidebarBtn을 대상으로 설정하세요:


1. 원하는 대로 색상을 설정하세요.

2. cursor를 pointer로 설정하세요.

3. hover 시 opacity를 변경하세요 (1 이외의 값으로)

 

오직 #openSidebarBtn만을 대상으로 설정하세요: 

1. 원하는 대로 margin을 설정하세요

직접 해보기

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="styles.css">
  <title>Mobile Sidebar</title>
</head>
<body>
  <button id="openSidebarBtn">Open</button>
  <div id="sidebar" class="sidebar">
    <button id="closeSidebarBtn">Close</button>
    <!-- Your sidebar content goes here -->
    <p>Home</p>
    <p>About</p>
    <p>Services</p>
    <p>Contact</p>
  </div>
  <script src="script.js"></script>
</body>
</html>

사이드바 | 프론트엔드 프로젝트의 모든 레슨