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

**URL:** <https://forum.freecodecamp.org/t/css-12/612849>\
**Category:** General\
**Tags:** chinese-中文\
**Created:** [May 29, 2023, 12:11pm UTC](https://forum.freecodecamp.org/t/css-12/612849 "2023-05-29T12:11:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mogerlin](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mogerlin](https://forum.freecodecamp.org/u/mogerlin)\
**Post date:** [May 29, 2023, 12:11pm UTC](https://forum.freecodecamp.org/t/css-12/612849/1 "2023-05-29T12:11:12Z")

</div>

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

**你目前的代码**

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

<!-- User Editable Region -->

    <style>
      h1 {
        text-align: center;
      }
      * {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; rv:109.0) Gecko/20100101 Firefox/113.0`

**挑战：** 通过编写咖啡店菜单学习基础 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:** ![sep.11842](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sep.11842/32/307528_2.png) [@sep.11842](https://forum.freecodecamp.org/u/sep.11842)\
**Post date:** [May 29, 2023, 12:59pm UTC](https://forum.freecodecamp.org/t/css-12/612849/2 "2023-05-29T12:59:41Z")

</div>

> [@mogerlin](#):
>
> ```auto
> <style>
> h1 {
> text-align: center;
> }
> * {text-align: center;}
> </style>
> 
> ```

这里应该要有h1, h2 和 p. 你怕忘了吧？

---

<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, 12:01pm UTC](https://forum.freecodecamp.org/t/css-12/612849/3 "2025-01-07T12:01:06Z")

</div>

Closed on January 7, 2025, 12:01pm UTC


