4

我如何用 HAML 写这个?

<a class="pull-left" href="#">
  <img class="media-object" data-src="holder.js/64x64">
</a>

我试过了,但失败了:

=link_to "#", :class => "pull-left
 =image_tag "64x64.gif", :class => "media-object"
4

1 回答 1

7

这是 HAML 中的正确方法(注意行do尾的link_to):

= link_to "#", :class => "pull-left" do
  = image_tag "64x64.gif", :class => "media-object"
于 2013-07-23T00:50:31.137 回答