Skip to content

Instantly share code, notes, and snippets.

View cherrerajobs's full-sized avatar
🏠
Working from home

Christopher Herrera cherrerajobs

🏠
Working from home
  • Dynasoul Studio
View GitHub Profile
@cherrerajobs
cherrerajobs / README.md
Last active January 12, 2024 15:46 — forked from rebane2001/README.md
Tiny js code that will simulate a 3D view of your elements, like firefox used to do.

The original and fork did not work in Brave. Every year we stray further from the light of 3D visualized DOMs. Use the new modified,minified, and fixified code below.

Explanations

This script will get the computed background color of your body, and then will create shadows darker than your background (if you have a light background), or lighter than your background (if you have a dark background). If the body does not have a background, the script will take 160 as the default value for red, green and blue.

It will then add a border, a box-shadow, a padding and a margin to each element of your page, and will use the cool rotate3d css function to tilt your website.

Install