在AMP页面上,amp-carousel元素是否应具有lightbox属性?

时间:2019-01-15 16:24:19

标签: html amp-html

我收到不同的冲突AMP验证消息。

当我向 amp-carousel 元素添加 lightbox 属性时,我会收到以下验证消息。

SELECT
  yourTable.Col1,
  RowStats.avg
FROM
  yourTable
CROSS APPLY
(
  SELECT
    AVG(x) AS avg
  FROM
  (
    SELECT yourTable.col2   AS x
    UNION ALL
    SELECT yourTable.col3   AS x
    UNION ALL
    SELECT yourTable.col4   AS x
    UNION ALL
    SELECT yourTable.col5   AS x
  )
    pivot
)
  AS rowStats

但是,如果我将其删除,则会收到以下验证消息。

The attribute 'lightbox' may not appear in tag 'amp-carousel'

感觉AMP验证器无法下定决心。

我正在使用此网址。 https://leasing.com/car-leasing-news/2018-mercedes-s-class-coupe-cabriolet/amp/

在以下验证器上。

https://search.google.com/test/amp

1 个答案:

答案 0 :(得分:1)

您错过了amp-lightbox-gallery-0.1.js添加标头

<script async custom-element="amp-lightbox-gallery" src="https://cdn.ampproject.org/v0/amp-lightbox-gallery-0.1.js"></script>

添加js屏幕截图后

enter image description here

之前

enter image description here