I’ve had a great idea for a website, and I think the page that eBay has created for it’s new logo is very interesting. I’m just wondering if anyone could give me any insight on how to recreate it.
http://pages.ebay.com/announcements/new/index.html
I sort of gather that the logo you can see through the gaps is set as the main bg, fixed and the front section just scrolls past it.
Two main questions:
- How do they get the ‘front’ div to fill the page
- How do they get the bg to change as you scroll down the page.
Thanks!
It’s actually quite simple. They have multiple background images that are applied to multiple
sectionelements, then they have applied afixedbackground-attachmentso that the backgrounds are always in the same position. The result is an element which somewhat functions as a mask to its background.You can really easily recreate the effect and so understand the implementation with this code:
HTML
CSS
See here for this code in situ: http://jsfiddle.net/CAMEn/