サイドバー - III
Coddyの「サイドバー | フロントエンド制作」コースのレッスン 8/13。
チャレンジ
簡単ターゲットクラス 'sidebar':
1. x軸のoverflowをhiddenに設定します。
2. transitionの期間を0.5sに設定します。
3. 任意のpaddingを追加します。
自分で試してみよう
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
<title>Sidebar</title>
</head>
<body>
<button id="openSidebarBtn">Open</button>
<div id="sidebar" class="sidebar">
<button id="closeSidebarBtn">Close</button>
<p>Home</p>
<p>About</p>
<p>Services</p>
<p>Contact</p>
</div>
<script src="script.js"></script>
</body>
</html>