gpt4 book ai didi

node.js - 在 Jade 中使 span 位于文本之前

转载 作者:太空宇宙 更新时间:2023-11-03 22:54:57 25 4
gpt4 key购买 nike

我正在开发一个导航栏,我试图在导航栏上设置一个按钮,格式如下:

(图标)(文本)

以下是 Jade 文件的摘录:

a(href="/signup")
h3 Sign Up
span(style="font-size: 1.25em; margin-top:2%" href="/graphing").glyphicon.glyphicon-pencil

目前这会产生:

(文字)(图标)

我怎样才能让跨度位于 h3 内部,但位于 jade 中的文本之前?

最佳答案

您应该使用管道文本:

a(href="/signup")
h3
span(style="font-size: 1.25em; margin-top:2%" href="/graphing").glyphicon.glyphicon-pencil
| Sign Up
<小时/>

来自The documentation :

Piped Text

The simplest way of adding plain text to templates is to prefix the line with a | character (pronounced "pipe").

关于node.js - 在 Jade 中使 span 位于文本之前,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22084268/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com