如何在Jade中创建带有标题的图形

问题描述 投票:1回答:2

我正在使用reveal.js创建一个演示文稿,我希望它包含数字和图形标题。这是我想要制作的幻灯片:

section
  h2 Slide title
  figure
    img(src="images/image.png" align="right" width="70%")
    figcaption Here are some details about the image.

不幸的是,这只是呈现带有标题的图像显示为p元素。任何人都知道如何在Jade中正确创建带字幕的数字?

node.js html5 pug figure reveal.js
2个回答
0
投票

这是在Jade中执行此操作的正确方法,您可以从输出HTML中看到。您只需使用一些自定义样式(CSS或其他)使其看起来更漂亮。


0
投票

只是改变这个:

figcaption Here are some details about the image.

对此:

figcaption = Here are some details about the image.
© www.soinside.com 2019 - 2024. All rights reserved.