# CSS 设置 100% 宽度

[Creating a CSS Curtain Opening Effect | CSS-Tricks](https://css-tricks.com/creating-css-sliding-door-effect/#aa-the-css-layout)

```css
.curtain {
  width: 100%; /* Ensures the component is the full screen width */
  height: 100vh; /* We're using this for demo purposes */
  overflow: hidden; /* Allows us to slide the panels outside the container without them showing */
}
```
