打开和关闭按钮
Coddy 侧边栏|前端项目 课程的第 3 课,共 13 课。
挑战
简单1. 在“Open”按钮下方,创建一个 id 和 class 都为“sidebar”的 div。
2. 在“sidebar”中创建一个 ID 为“closeSidebarBtn”、文本为“Close”的按钮。
亲手试试
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
<title>Sidebar</title>
</head>
<body>
<button id="openSidebarBtn">Open</button>
<!-- 在这里编写 HTML 代码 -->
<script src="script.js"></script>
</body>
</html>侧边栏|前端项目中的所有课
自己练习: Web 在线编辑器