Tagged articles
3 articles
Page 1 of 1
Code Mala Tang
Code Mala Tang
Jun 29, 2025 · Frontend Development

Master CSS background-image: Essential Techniques & Pro Tips

This comprehensive guide explains how the CSS background-image property works, walks through its basic syntax, key controlling properties, advanced techniques like gradients and multiple images, and offers best‑practice tips for optimization and responsive design.

FrontendResponsivebackground-image
0 likes · 7 min read
Master CSS background-image: Essential Techniques & Pro Tips
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 25, 2025 · Frontend Development

How to Dynamically Align Background Images Based on Content Height with CSS & Container Queries

This guide explains how to make a background image automatically adjust its position—centering when the title is short and anchoring to the bottom right when the title is long—using plain CSS, a tiny JavaScript toggle, and modern container queries for responsive components.

Frontendbackground-imagecontainer query
0 likes · 8 min read
How to Dynamically Align Background Images Based on Content Height with CSS & Container Queries