<div class="parallax" speed="2">
The blob changes his position according to how far you scroll. Notice how the blob aligns to the top.
View on CodepenDifferent speed
values lead to different results.
(The number in the blobs tells their speed)
speed
makes content look more like default content.position:static
speed
makes it look like it's behind the content.position:fixed
or background-attachment:fixed
<div class="parallax p-center" speed="2">
When you add the class p-center
, the blobs align to the middle of the screen.
<div class="parallax p-center" speed="-2">
While positive values make it look like "behind" the content, negative values make it look like it's in front of it.
speed
value (e.g. -3).position:static
speed
value (e.g. -1.5).