Menu
CoddyTech

字体和背景设置

Coddy 侧边栏|前端项目 课程的第 5 课,共 13 课。

challenge icon

挑战

简单

1. 将 body 的字体设置为 'Arial'。

2. 将 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>
            <p>Home</p>
            <p>About</p>
            <p>Services</p>
            <p>Contact</p>
        </div>
        <script src="script.js"></script>
    </body>
</html>

侧边栏|前端项目中的所有课

自己练习: Web 在线编辑器