amp-img的URL链接

问题描述 投票:0回答:1

amp-img的URL链接

如何放大图片网址而不是普通图片?

我已经尝试过以常规方式制作amp-html,但是没有用。

for-loop url hyperlink amp-img
1个回答
1
投票

您必须像这样添加AMP Carousel:

<amp-carousel id="custom-button"  width="400" height="300" layout="responsive" type="slides" autoplay delay="2000">
<a href="https://www.example.com/amp/" target="_blank"> <amp-img src="https://www.example.com/wp-content/uploads/2020/04/amp_img_1.jpg" width="400" height="300" layout="responsive" alt="AMP Carousel"></amp-img></a>
<a href="https://www.example2.com/amp/" target="_blank"> <amp-img src="https://www.example.com/wp-content/uploads/2020/04/amp_img_2.jpg" width="400" height="300" layout="responsive" alt="AMP Carousel"></amp-img></a>
</amp-carousel>

然后您必须在锚标记上添加CSS,如下所示:display:grid;

© www.soinside.com 2019 - 2024. All rights reserved.