【发布时间】:2015-10-19 20:17:32
【问题描述】:
我需要从数据库中显示一个字符串,例如“hello world” 其中 {{{content}}} 包含前 3 个字符“hel”,{{{content1}}} 包含其余字符。
我的html代码是
<li class="contentMain">{{{content}}}{{{content1}}}</li>
CSS代码是
.contentMain{
position: relative;
top: -15px;
font-family: Palatino Linotype, Georgia, Verdana, sans-serif;
}
我希望输出为“hello world”。
但它正在显示
“哎呀
世界”
为什么“hel”和“lo”之间有换行符。
谢谢大家。
【问题讨论】:
-
尝试使用双大括号而不是三重大括号。这里不需要使用三重奏。另外,右键单击浏览器中的 html 文本,单击检查元素并向我们显示它在 html 中所说的内容。
-
感谢您的回答。我已经通过使用 id 而不是 class 并通过 display:inline of paragraph 解决了这个问题
标签: javascript html css meteor