How to Add Shadow in CSS
Three ways to add shadows: box-shadow for elements, text-shadow for typography, and drop-shadow for transparent images.
box-shadow
Most common shadow for cards, buttons, and containers.
text-shadow
Add depth to text for headers or decorative typography.
filter: drop-shadow()
Follows the shape of transparent images and SVGs.
Inset Shadow
Creates an inner shadow for pressed or carved effects.
Shadow Scale Examples
Click any shadow to copy its CSS value.
Frequently Asked Questions
box-shadow creates a shadow around the element's bounding box (rectangle). drop-shadow follows the actual shape of the element, including transparent areas. Use drop-shadow for PNG images with transparency or SVG icons.
Separate multiple shadows with commas. For example: box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1); This creates layered shadow effects.
Adding 'inset' keyword creates an inner shadow (inside the element) instead of an outer shadow. Useful for pressed button effects or input fields: box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
More CSS Tutorials
Copy CSS from Website
Extract styles with 2 clicks
Center a Div (CSS)
Flexbox, Grid, and more
Center a Div (Tailwind)
Utility classes for centering
Convert CSS to Tailwind
CSS to utility classes
Glassmorphism Effect
Frosted glass UI style
Neumorphism Button
Soft UI button design
Responsive Navbar
Mobile-friendly navigation
Sticky Header
Fixed navigation on scroll
CSS Pagination
Page navigation styles
CSS Accordion
Expandable content sections
Dropdown Menu
Hover and click dropdowns
CSS Modal
Popup dialog boxes
Toast Notifications
Animated alert messages
Hamburger Menu
Animated menu icon
Animate Gradients
Moving gradient backgrounds
Skeleton Loader
Loading placeholder UI
Element Screenshot
Capture any element as image
Pick Color from Website
Eyedropper tool comparison
Identify Fonts
Find fonts on any website
Download All Images
Bulk save images from any site
Measure Elements
Page ruler and measurements
Extract Colors from Website
Get any color palette instantly
Dark Mode Toggle
CSS variables and localStorage
Responsive Grid
CSS Grid auto-fit and minmax
Center Text in CSS
text-align, Flexbox, and Grid
Make Text Bold
font-weight values explained
Round Corners in CSS
border-radius and pill shapes
Style File Input
Custom upload buttons
