谷歌放大器轮播不会使用nextjs自动播放

时间:2020-05-23 03:33:30

标签: amp-html

轮播中我有3个内容,但是设置属性autoplay不适用于所有浏览器。我想知道next.js是否需要做一些特定的事情?

轮播中我有3个内容,但是设置属性autoplay不适用于所有浏览器。我想知道next.js是否需要做一些特定的事情?

<amp-carousel
            height="400"
            width="400"
            type="slides"
            autoplay="autoplay"
            delay="2000"
            loop="loop"
          >
            <div class="testimonials-card">
              <amp-fit-text
                width="300"
                height="250"
                layout="fixed"
                max-font-size="25"
              >
                Share what your customers are saying about your products, your
                company...
              </amp-fit-text>
              <amp-img
                src="frederick_mfinanga_avatar.jpg"
                width="80"
                height="80"
              ></amp-img>
            </div>
            <div class="testimonials-card">
              <amp-fit-text
                width="300"
                height="250"
                layout="fixed"
                max-font-size="25"
              >
                I've worked with Fred a few times, he's a creative and fun
                person to work with
              </amp-fit-text>
              <amp-img
                src="frederick_mfinanga_avatar.jpg"
                width="80"
                height="80"
              ></amp-img>
            </div>
            <div class="testimonials-card">
              <amp-fit-text
                width="300"
                height="250"
                layout="fixed"
                max-font-size="25"
              >
                Share what your customers are saying about your products, your
                company...
              </amp-fit-text>
              <amp-img
                src="frederick_mfinanga_avatar.jpg"
                width="80"
                height="80"
              ></amp-img>
            </div>
          </amp-carousel>

am使用export const config = { amp: true };在nextjs上设置放大器页面

1 个答案:

答案 0 :(得分:0)

<amp-carousel height="400" width="400" type="slides" controls="" loop="" autoplay="" delay="2000">...</amp-carousel>

经过测试,可以正常工作,没有任何放大器错误

相关问题