【问题标题】:Using Google AMP tags with Laravel Blade在 Laravel Blade 中使用 Google AMP 标签
【发布时间】:2018-09-13 09:01:18
【问题描述】:

我同时使用 Google AMP (moustache.js) 和 Laravel Blade。 According to Laravel,我所要做的就是在括号前添加@

我可以做到的:

<!-- Grid-->
<amp-list width="auto"
  height="100"
  layout="fixed-height"
  src="/api/activity/all"
  [src]="acts.data"
  class="m1"
  items="data">
  <template type="amp-mustache">
    <amp-img width="108" height="70" src="@{{cover}}"></amp-img>
  </template>
</amp-list>

但是,在内联样式中添加 AMP 列表呈现的值不起作用。

<div style="background-image:@{{cover}}; width: 100%; height: 400px; "></div>

顺便说一句...现在可以在 AMP 中进行内联样式设置。

【问题讨论】:

    标签: php laravel laravel-blade amp-html


    【解决方案1】:

    试试这个:

    <div style="background-image: url('@{{cover}}'); width: 100%; height: 400px; "></div>
    

    【讨论】:

      猜你喜欢
      • 2023-03-23
      • 1970-01-01
      • 2015-12-24
      • 1970-01-01
      • 2015-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-11
      相关资源
      最近更新 更多