The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Section border shape change on scroll Reply To: Section border shape change on scroll


The basic idea looks quite simple, placing two divs at the top of the section and change their size based on the scroll position. The triangle shape itself seems to have been done with the border trick.

Essentially nice but quite horrible for page performance when used as an animation. It requires a lot of repaints that are noticeably slowing things down.

Here’s something (far from perfect) I alternatively threw together:

I think transforms are a better way to go (they don’t require repaints)…