Sidebar - III
Lektion 8 von 13 im Kurs Sidebar | Front-end-Projekt von Coddy.
Aufgabe
EinfachZielklasse 'sidebar':
1. Setzen Sie overflow für x auf hidden.
2. Setzen Sie die Dauer der transition auf 0.5s.
3. Fügen Sie ein padding Ihrer Wahl hinzu.
Probier es selbst
<!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>