haml标记中的元素非法错误

时间:2018-07-03 22:57:41

标签: html templates haml

我在代码笔中有一段haml标记。我不断收到此错误,不知道应该更改什么。

错误消息是:“非法元素:类和ID必须具有值。”

.hover_box
  %header.hidden

%section.center-column.center-column-title_block.container
  %h1.address_box-title submit your doggo
  %h3.metadata.author by john kazzatspy
  %h4.metadata.date-published april 09

.carousel.ui.container.cards.small
  .card.
    .image
      %img(src="http://via.placeholder.com/50x50")
    .content
      .description fdjsnajfdnsjk fjsanskjfn

%section.center-column.center-column-content
  %textarea.text_input.toSubmit
  %button.ui.button.primary kjkljklj
  .content-container
    %p.content This is a slice of text that I'm serving up to you as a placeholder for all the fabulous content that will be putting in here later.
  %p 
  %p
  %p
  %p

.card-gallery 
%footer

1 个答案:

答案 0 :(得分:2)

该错误来自文件的第10行:

.card.

最后的.使Haml为此元素寻找另一个类,但没有一个。

您可能只需要删除该.

.card