侧边栏内容
Coddy 侧边栏|前端项目 课程的第 4 课,共 13 课。
挑战
简单1. 在'sidebar' 内部的 'Close' 按钮下方,创建四个段落标签,分别包含文本 'Home'、'About'、'Services' 和 'Contact'。
2. 在 CSS 文件中,将 body 标签的边距设为零。
亲手试试
<!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>
<!-- 在这里编写 HTML 代码 -->
</div>
<script src="script.js"></script>
</body>
</html>侧边栏|前端项目中的所有课
自己练习: Web 在线编辑器