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

Rounded Triangle CSS Image Mask

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.

Technologies:
HTML CSS
Difficulty: Intermediate
Browser Support (as of Feb 2026):
Chrome Chrome 105+ Edge Edge 105+ Firefox Firefox 121+ Safari Safari 15.4+
Features:
Trigonometric Math Adjustable Radius Gradient Masking Responsive Geometry
Code by: Temani Afif Temani Afif
License: MIT
Dark UI cards with angled bottom corners and a passing light beam effect on the border, demonstrating CSS corner-shape.

Beveled Corner Glow Cards

This Beveled Corner Glow Card component demonstrates the bleeding edge of CSS UI styling. It primarily utilizes the new corner-shape property to create chamfered (angled) edges without complex clip-paths, while implementing a sophisticated CSS Mask fallback for older engines. The interaction features a “scanning” light beam effect on the border, powered by CSS Houdini for buttery smooth interpolation.

Technologies:
HTML CSS
Difficulty: Advanced
Browser Support (as of Jan 2026):
Chrome Chrome 120+ Edge Edge 120+ Firefox Firefox 120+ Safari Safari 17+
Features:
CSS Corner Shape Houdini (@property) CSS Masks Progressive Enhancement
Code by: Ana Tudor Ana Tudor
License: MIT

See the Pen Beveled Corner Glow Cards.

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.

Smooth Corners with CSS

Smooth Corners with CSS

A progressive technique for creating complex UI shapes using the CSS Houdini Paint API - a squircle is generated by the smooth-corners worklet, surpassing the capabilities of border-radius. The shape’s curvature is dynamically controlled via the --smooth-corners CSS Custom Property, while the effect itself is built with a combination of pseudo-elements, mask, and clip-path.

See the Pen Smooth Corners with CSS.

Inverted Border Boxes

Inverted Border Boxes

A demonstration of a non-trivial technique for creating inverted rounded corners using ::before pseudo-elements and box-shadow. This trick allows you to “carve out” complex shapes from parent blocks, bypassing the limitations of standard border-radius.

See the Pen Inverted Border Boxes.

Post-It Note with Lifted Corners

Post-it simulation using pseudo-elements and shadows. :before and :after create 3D paper effect with folded corners, transforms add slight skew for natural look. Inner block with background completes the illusion.

Bubble Corner Effect

“Bubble” corner effect triggered by hovering an invisible area. Icon transforms into full-screen message through pseudo-element resizing and positioning. Two animation timings separate content and background movement.

CSS Scooped Corners

Responsive cards with variable background geometry. CSS variables control pseudo-element position and radius, creating color bleed effect between header and section. Media query changes structure — colored circle shifts based on card parity.

Pixel Corners

Six corner variants assembled from box-shadow. Each corner draws unique pixel pattern through shadow coordinates. Transform rotation creates symmetry in all four corners. Variant class uses thinner dots.

CSS Box Corners

Universal mixin for creating corner frames with animation. Parameters control color, line thickness and position (inside/outside). On hover, corners move creating border pulse effect — logic extracted into reusable code.

CSS Flat Folded Corner

Folded corner effect achieved through two gradients and drop-shadow filter. First creates fold triangle, second forms main background with cutout. Pseudo-element adds shadow on fold — no extra wrappers.

Dynamic Sharp Corners

Corner elements created through border property combination. Each corner is a triangle formed by colored border and transparent opposite border. Size controlled by variable, card background can be image.

Card with Rounded Corners

Corner cutouts created through pseudo-elements with border-radius. Four elements form “recessed” corners on card and text block. Shadows compensate background color — cutout illusion without changing DOM.

Corner Border Button

See the Pen Corner Border Button.

Paper with Sellotaped Corners

Paper with Sellotaped Corners

Taped Sticky Notes Illustration replicates taped memo pads using CSS gradients. Creases are drawn across the .paper containers using thin crossed lines on a ::after pseudo-element. Translucent adhesive tape strips are rendered at the corners and top using opacity: 0.5 and dotted side borders to mimic torn dispenser edges. It is a highly creative vector layout done entirely without images.

See the Pen Paper with Sellotaped Corners.