# 通过编写咖啡店菜单学习基础 CSS - 步骤 12

**URL:** <https://forum.freecodecamp.org/t/css-12/626917>\
**Category:** General\
**Tags:** chinese-中文\
**Created:** [August 2, 2023, 7:11am UTC](https://forum.freecodecamp.org/t/css-12/626917 "2023-08-02T07:11:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zyp3295613196](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/zyp3295613196/32/327701_2.png) [@zyp3295613196](https://forum.freecodecamp.org/u/zyp3295613196)\
**Post date:** [August 2, 2023, 7:11am UTC](https://forum.freecodecamp.org/t/css-12/626917/1 "2023-08-02T07:11:28Z")

</div>

**告诉我们发生了什么：**  
在此详细描述你的问题。

我按照提示写了对应的选择器，可是报错” 你不应该添加一个新的 `style` 标签。 将新的 CSS 规则添加到现有的 `style` 标签中。“

**你目前的代码**

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>

<!-- User Editable Region -->

    <style>
      h1 {
        text-align: center;
      }
      h2{
        text-align: center;
      }
      p{
        text-align: center;
      }
    </style>

<!-- User Editable Region -->

  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>

```

**你的浏览器信息：**

用户代理是： `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36`

**挑战：** 通过编写咖啡店菜单学习基础 CSS - 步骤 12

**挑战的链接：**

> **[freeCodeCamp.org](https://www.freecodecamp.org/chinese/learn/2022/responsive-web-design/learn-basic-css-by-building-a-cafe-menu/step-12)**
>
> 免费学习编程

---

<div class="post-metadata">

**Author:** ![zyp3295613196](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/zyp3295613196/32/327701_2.png) [@zyp3295613196](https://forum.freecodecamp.org/u/zyp3295613196)\
**Post date:** [August 2, 2023, 9:56am UTC](https://forum.freecodecamp.org/t/css-12/626917/2 "2023-08-02T09:56:52Z")

</div>

我又重新提交了一下 可以了 应该是bug

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 7, 2025, 11:47am UTC](https://forum.freecodecamp.org/t/css-12/626917/3 "2025-01-07T11:47:34Z")

</div>

Closed on January 7, 2025, 11:47am UTC


