For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.2.0/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.2.0/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.2.0/components/card.md.
  • 简体中文
  • v0.2.0
  • 卡片

    Live previewHTML · CSS · JavaScript

    Login to your account

    Enter your email below to login to your account

    用途

    Include CSS

    导入 Tailwind 和一个完整的 A3S UI 样式包。

    @import "tailwindcss";
    @import "@a3s-lab/ui/a3s.css";

    或者只导入基本CSS、关联组件CSS和一个样式包。

    @import "tailwindcss";
    @import "@a3s-lab/ui/base.css";
    @import "@a3s-lab/ui/components/card.css";
    @import "@a3s-lab/ui/styles/a3s.css";

    使用CDN或批量程序导入?请参见安装页

    Add your card HTML

    <div class="card">
      <header>
        <h2>Card Title</h2>
        <p>Card Description</p>
        <div class="card-action">Card Action</div>
      </header>
      <section> <p>Card Content</p></section>
      <footer>
        <p>Card Footer</p>
      </footer>
    </div>

    HTML结构

    <div class="card">

    The card container. Use data-size="sm" for a denser layout.

    <header>

    The card header.

    <h2> or <h3>
    The card title.
    <p> Optional
    The card description.
    <div class="card-action"> Optional
    Action or metadata placed in the top-right of the header. Use <menu class="card-action"> when the content is a list of commands.
    <section>
    The main card content.
    <footer> Optional
    Footer actions or secondary content at the bottom of the card.

    示例

    尺寸

    使用data-size="sm"将卡的尺寸设置为小。小尺寸变体使用更小的间距。

    Live previewHTML · CSS · JavaScript

    Small Card

    This card uses the small size variant.

    The card component supports a size attribute that can be set to sm for a more compact appearance.

    图片

    在卡片标题前添加图像以创建带有图像的卡片。

    Live previewHTML · CSS · JavaScript
    Event cover

    Design systems meetup

    A practical talk on component APIs, accessibility, and shipping faster.

    Featured

    RTL

    dir="rtl" 添加到卡或祖先。

    Live previewHTML · CSS · JavaScript

    تسجيل الدخول إلى حسابك

    أدخل بريدك الإلكتروني أدناه لتسجيل الدخول إلى حسابك