簡體   English   中英

無法正確獲取Jade語法

[英]Cant get Jade syntax correct

我有這個玉器布局文件,但是每次嘗試渲染它時,都會出現“意外文本”; 在backgound上:url(...)。 我不確定如何解決。 我看了另一個例子,他們這樣做。

doctype html
 html
head
style
  body {
    background: url('!{imageURI}');
    background-size:75%;
    background-repeat: no-repeat;
  }
body
h1 Tweets
h1 #{tweet.text}
h1  @#{tweet.user.screen_name}

您的哈巴狗模板中有兩個錯誤:

  1. HTML前的空格
  2. style之后缺少點。

正確的模板如下所示:

doctype html
html
head
body
style.
  body {
    background: url('!{imageURI}');
    background-size: 75%;
    background-repeat: no-repeat;
  }
h1 Tweets
h1 #{tweet.text}
h1 @#{tweet.user.screen_name}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM