跳转到内容
本站为社区维护的非官方中文翻译,与 Cloudflare, Inc. 无关联。本站不提供账户登录,请勿在任何非官方站点输入您的 Cloudflare 账户信息。官方文档:developers.cloudflare.com

宽度

最后更新 查看 MarkdownAgent 设置

该组件可用于限制内容(如文本或图像)的宽度。

导入

import { Width } from "~/components";

用法

import { Width } from "~/components";

<Width size="large">This content will take up 75% of the container width</Width>

<Width size="medium">
	This content will take up 50% of the container width
</Width>

<Width size="small">This content will take up 25% of the container width</Width>

<Width size="small" center>
	This content will take up 25% of the container width and be centered
</Width>

<Width> 属性

size

必填

类型:"large" | "medium" | "small"

控制容器的宽度:

  • large:容器宽度的 75%
  • medium:容器宽度的 50%
  • small:容器宽度的 25%

center

类型:boolean

是否水平居中内容。

这篇文档对您有帮助吗?