Google AMP Parallax Library

Documentation and examples for opting parallax into responsive behavior: Google AMP Parallax Library.

Google AMP Parallax

The amp-fx-collection component provides a collection of preset visual effects, such as parallax that can be easily enabled on any element via amp-fx attribute.

Add the Google AMP FX collection script

Add the script mentioned below to the Google AMP pages where you would like to enable amp-fx-collection. The script should be added to the <head> section.

<script async custom-element="amp-fx-collection" src=""></script>

Google AMP Parallax · Text

The parallax effect allows an element to move as if it is nearer or farther relative to the foreground of the page content. As the user scrolls the page, the element scrolls faster or slower depending on the value assigned to the data-parallax-factor attribute.

Parallax effect can be added to any element by adding amp-fx="parallax" attribute and the intensity of the effect can be controlled via data-parallax-factor.

data-parallax-factor specifies a decimal value that controls how much faster or slower the element scrolls relative to the scrolling speed: A value greater than 1 scrolls the element upward (element scrolls faster) when the user scrolls down the page. A value less than 1 scrolls the element downward (element scrolls slower) when the user scrolls downward.

Google AMP parallax
Google AMP title parallax
<div class="parallax-section">
  <h5 amp-fx="parallax"
    <span class="parallax-title">Google AMP parallax</span><br>
    <span>Google AMP title parallax</span>

Google AMP Parallax · Images

<div class="parallax-image-window">
  <amp-img amp-fx="parallax"

Google AMP parallax documentation

Read more
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies.