- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Text in Transparent Box using CSS3
To set text in transparent box with CSS3, the code is as follows −
Example
<!DOCTYPE html> <html> <head> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .transparentBox { background: url("https://i.picsum.photos/id/249/1000/300.jpg") repeat; border: 2px solid black; } .transparentText { margin: 30px; background-color: #ffffff; border: 1px solid black; opacity: 0.6; } .transparentText p { margin: 5%; font-weight: bolder; color: #000000; font-size: 20px; } </style> </head> <body> <h1>Text in transparent box example</h1> <div class="transparentBox"> <div class="transparentText"> <p>This is some random text inside the transparent box</p> </div> </div> </body> </html>
Output
The above code will produce the following output −
- Related Articles
- How to create CSS3 Box and Text Shadow Effects?
- Breaking Overflow Text using CSS3
- Creating Layouts with Box-Sizing using CSS3
- CSS3 Box Width with Box-Sizing
- CSS3 Flexible Box Layouts
- How to limit input text length using CSS3?
- Create a transparent box with CSS
- Handling Text Overflow in CSS3
- How to make controlling corners of Text transparent using FabricJS?
- How to find text box height in IText using FabricJS?
- How to input text in the text box without calling the sendKeys() using Selenium?
- How to create an image with a transparent background text using CSS?
- CSS2 sizing property vs CSS3 box sizing property
- How to Only Allow Numbers in a Text Box using jQuery?
- Automatically position text box in Matplotlib

Advertisements