October 2017
Intermediate to advanced
370 pages
8h 57m
English
On carousels with type="slides", we can add the attribute autoplay to cycle through the slides automatically. The time between slide transitions can be adjusted by adding the attribute delay--for example, delay="2000" will give a two second delay, so the carousel markup will look like this:
<amp-carousel id="hero-images" width="1024" height="480" layout="responsive" type="slides" autoplay delay="2000"> ...</amp-carousel>
Since this is a hero carousel, each slide of which is going to be an offer or promotion, we want each item to be clickable and to lead to the associated offer page, so each slide item will be contained within an a tag:
<a href="product-page.htm"> <amp-img src="img/tshirt-banner-1024.jpg" ...
Read now
Unlock full access