الأزرار - ٢
الدرس 11 من 13 في دورة شريط جانبي | مشروع Front-end على Coddy.
التحدي
سهلاستهدف #closeSidebarBtn و #openSidebarBtn:
1. قم بتعيين اللون حسب اختيارك.
2. قم بتعيين cursor إلى pointer
3. قم بتغيير opacity عند hover (أي قيمة عدا 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>
جميع دروس شريط جانبي | مشروع Front-end
1مقدمة
ماذا ستبني؟