小编Alv*_*Lau的帖子

使用pug.js在<a> </a>标记内放置一个按钮

这是我的预期结果:

<a>
    <button class="btn btn-tomato mx-auto" type="button" style="width:50%; white-space: normal; opacity:0.8;">Button text</button>  
</a>
Run Code Online (Sandbox Code Playgroud)

所以我这样写我的哈巴狗:

a
    button.btn.btn-tomato.mx-auto(type='button', style='width:50%; white-space: normal; opacity:0.8')
Run Code Online (Sandbox Code Playgroud)

但是,结果是这样的:

<a></a>
<button class="btn btn-tomato mx-auto" type="button" style="width:50%; white-space: normal; opacity:0.8;">Button text</button>
Run Code Online (Sandbox Code Playgroud)

<button>在不<a>。你能告诉我如何解决吗?谢谢。

html node.js pug

-1
推荐指数
1
解决办法
95
查看次数

标签 统计

html ×1

node.js ×1

pug ×1