【问题标题】:Jade template: How to create a hyperlink in UL with description to the hyperlinkJade 模板:如何在 UL 中创建带有超链接描述的超链接
【发布时间】:2014-09-22 15:15:45
【问题描述】:

我正在尝试创建一个带有超链接的列表。每个列表项在一行中包含一个主题和对该主题的简单描述。我想包含主题的超链接,但不包含描述。我所做的如下。

ul#subjects
    li
        a(href="#") Subject: Here is the description of the subject

该链接可以正常工作,但它涵盖了整行文本。如何关闭超链接,使其在 HTML 中变成如下所示的内容?请注意,超链接不包含“:”。

<ul id='subjects'>
    <li><a href='#'>Subject</a>: Here is is the description of the subject
</ul>

谢谢。 :)

【问题讨论】:

  • 供以后参考的好工具:html2jade.org
  • 哇,好工具,伙计。非常感谢。

标签: node.js pug


【解决方案1】:

使用| 在 Jade 中显示 HTML 文本

例如

ul#subjects
  li
    a(href="#") Subject
    | : Here is the description of the subject

【讨论】:

  • 太棒了!非常感谢。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-06-22
  • 2011-05-17
  • 2017-05-26
  • 2017-05-15
  • 1970-01-01
  • 2014-04-18
相关资源
最近更新 更多