Subtle soft shadow for cards and containers
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
Browser support: All modern browsers. IE9+.
CSS Snippet Library
This hub collects every published CSS example on DuskTools in a single discovery page. Use it to compare gradients, shadows, glassmorphism, text tricks, and layout snippets without hopping blindly between isolated article pages.
Each item links to a focused detail page with live preview code, copy support, related tools, and browser support notes so designers and frontend developers can move quickly from inspiration to implementation.
Example pages
15
Visual categories
6
CSS helper hubs
3
Depth, elevation, and glow treatments for cards, panels, and standout UI.
Subtle soft shadow for cards and containers
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
Browser support: All modern browsers. IE9+.
Strong elevated shadow for floating elements
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
Browser support: All modern browsers. IE9+.
Glowing neon effect using colored shadows
box-shadow: 0 0 20px rgba(0, 255, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.2);
Browser support: All modern browsers. IE9+.
Copy-ready background gradients for hero sections, buttons, and visual accents.
Popular blue-to-purple diagonal gradient
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
Browser support: All modern browsers. IE10+ for linear-gradient.
Warm pink-to-red sunset gradient
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
Browser support: All modern browsers. IE10+.
Cool blue ocean-inspired gradient
background: linear-gradient(135deg, #667eea 0%, #00d2ff 100%);
Browser support: All modern browsers. IE10+.
Fresh green emerald gradient
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
Browser support: All modern browsers. IE10+.
Trendy visual effects that help prototype modern glassy or soft UI styles.
Frosted glass effect trending in modern UI
background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 16px;
Browser support: backdrop-filter: Chrome 76+, Safari 9+, Firefox 103+. Not supported in IE.
Soft UI / neumorphic design style
background: #e0e0e0; border-radius: 16px; box-shadow: 8px 8px 16px #bebebe, -8px -8px 16px #ffffff;
Browser support: All modern browsers. Best on light backgrounds.
Useful typography snippets for overflow handling and expressive heading treatments.
Apply gradient colors to text
background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
Browser support: Chrome 2+, Safari 4+, Firefox 49+. -webkit- prefix needed for older Safari.
Cut off text with ... when it overflows
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
Browser support: All browsers. text-overflow: ellipsis since IE6.
Small CSS rules that improve how interfaces feel, scroll, and respond.
Enable smooth scrolling for anchor links
html {
scroll-behavior: smooth;
}Browser support: Chrome 61+, Firefox 36+, Safari 15.4+. scroll-behavior widely supported.
Centering and positioning patterns developers reach for constantly.
Center an element using absolute positioning
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
Browser support: All browsers. transform since IE9.
Center content using CSS Flexbox
display: flex; justify-content: center; align-items: center;
Browser support: All modern browsers. Flexbox since IE10 (partial), IE11+ full.
Center content using CSS Grid (shortest method)
display: grid; place-items: center;
Browser support: All modern browsers. Grid since Chrome 57+, Firefox 52+, Safari 10.1+.
Keep browsing with related discovery pages for regex patterns, JavaScript snippets, developer references, and the broader DuskTools directory.