按钮 - I
Coddy 侧边栏|前端项目 课程的第 10 课,共 13 课。
挑战
中等针对 #openSidebarBtn 和 #closeSidebarBtn:
1. 根据你的选择设置背景颜色
2. 禁用边框样式
3. 根据你的选择设置边框圆角
4. 根据你的选择设置内边距
5. 根据你的选择设置字体大小
亲手试试
<!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>
<!-- 在这里放入侧边栏内容 -->
<p>Home</p>
<p>About</p>
<p>Services</p>
<p>Contact</p>
</div>
<script src="script.js"></script>
</body>
</html>
侧边栏|前端项目中的所有课
自己练习: Web 在线编辑器