Equilateral triangular images with soft rounded corners achieved through CSS masking and trigonometric math, overlapping on a vibrant background.

Rounded Triangle CSS Image Mask

demo & code

This Rounded Triangle CSS Image Mask offers a mathematically perfect way to shape visuals into equilateral triangles with soft, professional edges. It is an ideal choice for high-end portfolio galleries, creative team sections, or landing pages where standard rectangular or circular crops feel too conventional. By leveraging modern CSS math, the shape remains perfectly symmetrical regardless of the image dimensions.

Level: Intermediate
Browser Support: Chrome 105+, Edge 105+, Firefox 121+, Safari 15.4+
Background image card with a smooth bottom black gradient overlay created using the CSS border-image fill property for better text contrast

Border Image Fill Gradient Overlay

demo & code

The Border Image Fill Gradient Overlay is a minimalist CSS technique used to add a decorative or functional gradient over background images. Unlike traditional methods that require extra HTML markup or ::before/::after pseudo-elements, this approach uses a single, underutilized property to enhance text contrast and visual depth.

Level: Beginner
Browser Support: Chrome 15+, Edge 12+, Firefox 15+, Safari 6+
A circular avatar that scales up with a smooth pop-out effect on hover.

Fancy Hover Effect on Avatar

A pure CSS “pop-out” avatar effect utilizing CSS variables to orchestrate a scale transition.

See the Pen Fancy Hover Effect on Avatar.

Images displayed in a modern squircle shape with a soft drop shadow, similar to iOS icons.

Squircle Image Web Component

Images take on an aesthetic, modern squircle shape (resembling iOS icons) with a soft drop shadow that perfectly follows their contour.

See the Pen Squircle Image Web Component.

A gallery of images framed to look like interlocking jigsaw puzzle pieces.

Wavy Image Gallery

Images appear as jigsaw puzzle pieces with interlocking edges that can visually fit together.

See the Pen Wavy Image Gallery.

Image Duotoning with SCSS

Image Duotoning with SCSS

A pure CSS duotone filter effect achieved by stacking layers with mix-blend-mode. The image is set to darken against a colored container, while an overlay pseudo-element uses lighten to tint the highlights, creating a cohesive two-color aesthetic controlled by SCSS variables.

See the Pen Image Duotoning with SCSS.

Image Peeling Hover Effect

Image Peeling Hover Effect

Hovering over the grid triggers a light flare sweep, transforming the images from a distorted, stretched state into their sharp, original form, creating a futuristic transition effect.

See the Pen Image Peeling Hover Effect.

Turbulence Effect with Blend Modes

Turbulence Effect with Blend Modes

Live demo showcasing dynamic mix-blend-mode and background-blend-mode combinations. Interactive 3D tilt and SVG turbulence distortion trigger on hover.

Fancy Corner Decoration for Images

Fancy Corner Decoration for Images

A border effect for an <img> tag - the size of the decorative edge, created with repeating-conic-gradient and -webkit-mask, is dynamically calculated via a complex calc() function controlled by CSS variables.

Dissolving Image Edges

Dissolving Image Edges

Creating a “grainy” edge effect for a circular image using SVG filters. The effect is achieved through a complex combination of feGaussianBlur and feTurbulence primitives with multiple feComposite operations to control the alpha channel.

See the Pen Dissolving Image Edges.

CSS-Only Image Tilt Towards Cursor

CSS-Only Image Tilt Towards Cursor

A 3D image tilt effect that mimics cursor movement, achieved purely with CSS by combining multiple invisible overlay zones, the general sibling combinator, and the transform: rotate3d() function with perspective on the parent container.

Single Image with Squircle Shape and Inner Shadow

Single Image with Squircle Shape and Inner Shadow

Explore the power of CSS Grid with auto-fit for a responsive layout and SVG filtering techniques to give images a trendy squircle outline and unique shadow effect.

CSS Glitch Image Effect

CSS Glitch Image Effect

The key feature is the control of animation parameters via CSS variables, which allows for easy changes to the speed and intensity of the glitch. The animation itself is built on three layered elements, each with unique offsets, shadows, and clipping animations (@keyframes glitch-top/bottom).

See the Pen CSS Glitch Image Effect.

Squircle Image Crop

Squircle Image Crop

A sleek squircle avatar implementation using CSS clip-path referencing an inline SVG definition. The technique applies a superellipse mask to a background image, creating a modern, iOS-style rounded shape that scales responsively while maintaining its geometry.

See the Pen Squircle Image Crop.

CSS Holographic Masksexternal link

An impressive pure CSS holographic effect utilizing mix-blend-mode and fixed background gradients to create iridescent “living” masks. This lightweight approach serves as a performant alternative to WebGL for building scroll-reactive UI elements with deep visual textures.

Progressive Blur with Animationexternal link

A demonstration of smooth progressive image blurring using the CSS @property feature to define animatable custom variables. The effect is achieved by layering a blurred pseudo-element with a mask-image: linear-gradient() mask, creating a dynamic focus effect on hover.