Quantcast
Channel: Pens from Dan Wilson
Viewing all articles
Browse latest Browse all 599

Single Div Accordion (Animated with CSS Variables)

$
0
0

See the Code - See it Full Page - See Details

First attempt at Single Div Art. Wanted to see how Custom Properties (CSS Variables) can help with organization and animation. I am in awe of people who do single div art regularly. And as always seems to be the case, I am now on the other side of working on this with a fuller understanding of `background-size` and `background-position` especially in relation to relative gradients. In addition to `requestAnimationFrame` and CSS Variables. Works well in everything that supports Custom Properties, except I cannot get it to render in Edge. Fixed a crashing bug in Edge by changing how the `clip-path` is used (and reporting a bug), but there are other issues as discussed in the comments here.

This Pen uses: HTML, CSS, JavaScript, and


Viewing all articles
Browse latest Browse all 599

Trending Articles