简体   繁体   中英

Google ad parallax on background

I'm trying to put a google ad (iframe) on the background of a website and then let content scroll over it (parallax).

I tried it in different ways, but nothing seems ideal. I tried it by putting the iframe fixed behind the content, but while scrolling, it's sometimes above the content.

I also tried making the ad and content absolute. In this case I gave the content the height of the screen, and overflow-y: auto. In this case the scrolling of the website seemed unnatural and it gave some conflicts with other elements on the page.

I also tried putting the iframe within the content and then clipped it based on the scroll event of the page. In this case, the add 'buzzed' on the background.

Any other ideas what I could try? Kind regards

As per google adsense policy -

Drawing unnatural attention to ads includes placing Google ads in a floating box script that causes the ad to appear in a “sticky" position on the page as the user scrolls down. This type of ad implementation is not permitted.

Adsense Policy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM