通过创作罗斯科绘画学习 CSS 盒子模型 - 步骤 11

Tell us what’s happening:

在此详细描述你的问题。



.canvas 元素应该嵌套在新的 div 元素中。

/* file: styles.css */
.canvas {
  width: 500px;
  height: 600px;
  background-color: #4d0f00;
}
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Rothko Painting</title>
    <link href="./styles.css" rel="stylesheet">
  </head>
  <body>
步骤 11
每幅画都需要一个框架。

将 .canvas 元素包装在另一个 div 中。 为 div 赋予 frame 类。

<div class="canvas"> <div class=".canvas"> </div>
    </div>
### Challenge Information:
通过创作罗斯科绘画学习 CSS 盒子模型 - 步骤 11
https://www.freecodecamp.org/chinese/learn/2022/responsive-web-design/learn-the-css-box-model-by-building-a-rothko-painting/step-11

欢迎来到论坛 @dongdong

将 .canvas 元素包装在另一个 div 中,为该 div 指定 .frame 类

您的代码中的 div 元素的顺序不正确。

请重新设置步骤以恢复原始代码。

将开始的 .frame div 标签放置在现有元素上方。
然后将结束 div 标签放置在现有 div 元素下方。

快乐编码