Skip to content

鼓励作者:欢迎 star 或打赏犒劳

图 (Figure)

👁️ 预览

liquid
{% include figure.html image="images/group-photo.jpg" caption="团队在 2025 年年度圣诞派对上的合影" link="team" width="400px" %}
参数描述
image图的图片 URL。
caption标题内容。可以包含 Markdown。
link点击图片时导航到的 URL。
width / height图片的尺寸,单位为 px%。您应该只指定宽度或高度之一,以保持图片的原始宽高比。图片会缩小以适应较小的屏幕尺寸。

提示

images/fallback.svg 是一个图片,当(任何组件中的)图片加载失败时将显示该图片。这很有用,因为您可能经常链接到外部图片 URL,这些 URL 可能会在没有通知的情况下失效。

section 组件一起使用以制作全宽横幅的示例:

liquid
{% raw %}
{% include section.html size="full" %}

{% include figure.html image="images/banner.jpg" width="100%" %}

{% include section.html %}
{% endraw %}

继续的内容

如有转载或 CV 的请标注本站原文地址