A Utility Class for Covering Elements

Nice little trick to create “layers” in CSS.

.original-element {
    position: relative;
}

.covering-element {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

I have been using layers a lot lately. Mostly for small animations during festival season.

Pratyush Mittal @pratyush