跳转至

pl-card元件

在卡片式组件中显示问题内容。可以选择通过标签属性显示页眉、页脚和/或图像。

样品元素

question.html
<pl-card
  header="Header"
  title="Title"
  width="50%"
  img-bottom-src="https://via.placeholder.com/720x480"
>
  <pl-question-panel> This card is 50% width and has a bottom image. </pl-question-panel>
</pl-card>

定制

属性 类型 默认 描述
footer 字符串 卡页脚的内容。
header 字符串 卡标题的内容。
img-bottom-alt 字符串 底部图像的替代文本。
img-bottom-src 字符串 底部图片的源 URL。
img-top-alt 字符串 顶部图像的替代文本。
img-top-src 字符串 顶部图像的源 URL。
subtitle 字符串 卡副标题的内容。
title 字符串 卡标题的内容。
width "25%""50%""75%""auto" "auto" 卡的宽度。

细节

pl-card 属性反映了Bootstrap 卡 的选项。 headerfooter 标签属性可以在纯文本旁边包含 HTML 标签,以允许对其内容进行样式设置。

示例实现

  • [元素/卡片]