DevPrep
  • Interview Prep
  • Projects
  • Resources
  • Pricing
  • About Us
Submit Question
DevPrep
  • Pricing
  • About Us
Submit Question
← From Beginner to Expert in Fundamentals of Frontend
  • The Box Model
  • Specificity & The Cascade
  • CSS Units Deep Dive
  • Stacking Contexts & Z-Index
  • Flexbox Mastery
  • CSS Grid Mastery
  • Centering, Subgrid & Container Queries
  • CSS Custom Properties & Variables
  • Selectors: :has(), Pseudo-classes & Pseudo-elements
  • Responsive Functions: calc(), clamp(), min(), max()
  • Media Queries & Mobile-First Design
  • Transitions & Animations
  • Transforms, Filters & Clipping
  • CSS Methodologies: BEM, CSS-in-JS & Tailwind
  • Typography, Color Spaces & Dark Mode
  • CSS Performance & Optimization
  • CSS Interview Questions — Part 1
  • CSS Interview Questions — Part 2
← From Beginner to Expert in Fundamentals of Frontend

Transforms, Filters & Clipping

16 min read
Transforms3D CSSFiltersbackdrop-filterclip-pathGlassmorphismperspective

Visual Effects in CSS

2D Transforms

FunctionEffectExample
translate(x, y)Move elementtransform: translate(10px, -5px)
rotate(angle)Rotatetransform: rotate(45deg)
scale(x, y)Resizetransform: scale(1.5)
skew(x, y)Tilttransform: skewX(-5deg)

3D Transforms

Enable 3D space on the parent: perspective: 1000px;

FunctionAxis
rotateX()Flips toward/away from viewer
rotateY()Flips left/right like a door
rotateZ()Spins like a wheel (same as rotate())
translateZ()Moves closer/farther from viewer

CSS Filters

FilterEffectPerformance
blur()Gaussian blur⚠️ Heavy on large areas
brightness()Lighten/darken✅ Fast
contrast()Adjust contrast✅ Fast
grayscale()Remove color✅ Fast
saturate()Increase/decrease color intensity✅ Fast
hue-rotate()Shift colors on color wheel✅ Fast
drop-shadow()Shadow following shape (not box)⚠️ Moderate

backdrop-filter

Applies filters to the area behind an element (glassmorphism):

.glass {
  backdrop-filter: blur(10px) saturate(180%);
  background: hsl(0 0% 100% / 0.7);
}

clip-path

Creates non-rectangular shapes by clipping the visible area:

ShapeCode
Circleclip-path: circle(50%)
Ellipseclip-path: ellipse(50% 30%)
Triangleclip-path: polygon(50% 0%, 0% 100%, 100% 100%)
Diagonalclip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%)

Practice

  • JavaScript
  • DSA
  • Machine Coding
  • System Design

Resources

  • Learning Tracks
  • Articles
  • Roadmaps
  • Compare Concepts
  • Glossary
  • Developer Tools
  • All Questions

Company

  • About
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service
DevPrep

© 2026 DevPrep. All rights reserved.