Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Python
  3. Question
Python

CSS opacity only to background color, not the text on it?

Asked by Laim Sep 23, 2025 1.2K views 1 answer
Share

About this question

How can you make only the background of an element semi-transparent in CSS without affecting its text?  This technique helps create visually appealing overlays while keeping text fully readable.

Your answer

1 Answer

More Python discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Python Blogs

Guides, tips and career advice on Python from JanBask experts.