【问题标题】:I am unable to display string data in meteor properly我无法在流星中正确显示字符串数据
【发布时间】: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


【解决方案1】:

如下使用双括号:

<li class="contentMain">{{content}}{{content1}}</li>

【讨论】:

  • 感谢您的回答。我已经通过使用 id 而不是 class 并通过 display:inline of paragraph 解决了这个问题
猜你喜欢
  • 2016-03-31
  • 1970-01-01
  • 2017-05-08
  • 1970-01-01
  • 2010-12-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多