跳转到内容
搜索文档

宽度

最后更新 查看 MarkdownAgent 设置

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

导入

import { Width } from "~/components";

用法

import { Width } from "~/components";

<Width size="large">此内容将占用容器宽度的 75%</Width>

<Width size="medium">
	此内容将占用容器宽度的 50%
</Width>

<Width size="small">此内容将占用容器宽度的 25%</Width>

<Width size="small" center>
	此内容将占用容器宽度的 25% 并居中
</Width>

<Width> Props

size

必填

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

控制容器的宽度:

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

center

类型boolean

是否水平居中内容。

这篇文档对您有帮助吗?