什么是在翡翠中创建内联元素的简洁方法(What is a concise way to create inline elements in Jade)
我喜欢将我所有的内联元素放在一行中。
<ul> <li><a>click<span>here</span><strong>!</strong></a></li>想知道是否有更好的方法来创建Jade中的内嵌元素:
ul li a(href="#") click span here strong !这有点接近,但我不知道如何添加跨度和强标签,而不会打破线。
ul li: a(href='#') click span ...这显然不是一个超大的问题,但有点恼人,我不能内联元素。 谢谢您的帮助
I like to put all my inline elements in a single line.
<ul> <li><a>click<span>here</span><strong>!</strong></a></li>Wondering if there's a better way to create inline elements in Jade than this:
ul li a(href="#") click span here strong !This get's a little closer but I'm not sure how to add the span and strong tags without breaking the lines.
ul li: a(href='#') click span ...This obviously isn't a super big problem but it's a little annoying that I can't put inline elements inline. Thanks for the help
最满意答案
自1.0版以来 ,jade支持内联标签:
#[tag(attribute='value') inner stuff]在你的情况下,将是:
ul li #[a(href="#") click #[span here #[strong !]]]Since version 1.0, jade supports inline tags:
#[tag(attribute='value') inner stuff]In your case that would be:
ul li #[a(href="#") click #[span here #[strong !]]]更多推荐
发布评论