Menu
CoddyTech

页面主体

Coddy 滑块 | 前端项目 课程的第 11 课,共 23 课。

challenge icon

挑战

简单

目标是 body 标签:

1. 将 display 设为 flex,并使用 align-items 和 justify-content 将所有内容居中。

2. 将顶部和底部的内边距设为 0,左右内边距设为 35 像素。

3. 将最小高度设为 100vh。

4. 将背景颜色设为你喜欢的颜色。

提示:要设置渐变背景,可以使用 linear-gradient 函数。

background: linear-gradient(to left top, rgb(255, 192, 211), rgb(255, 20, 98));

亲手试试

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="styles.css">
</head>
    <body>
        <!-- 在这里编写 HTML 代码 -->
        <script src="script.js"></script>
    </body>
</html>

滑块 | 前端项目中的所有课

自己练习: Web 在线编辑器