- 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
How to create CSS3 Box and Text Shadow Effects?
To create CSS3 Box and Text Shadow effects, use the box-shadow and text-shadow property, respectively.
Following is the code to create CSS3 Box and text shadow effects −
Example
<!DOCTYPE html> <html> <head> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } h2 { color: rgb(28, 0, 128); text-shadow: red 2px 4px 2px; } div { color: white; text-align: center; width: 150px; height: 150px; background-color: red; box-shadow: rgb(89, 0, 255) 8px 2px 8px; } </style> </head> <body> <h1>Shadow effect example</h1> <h2>Text shadows</h2> <div>BOX SHADOW</div> </body> </html>
Output
The above code will produce the following output −
- Related Articles
- How to create CSS3 Transition Effects?
- Add shadow effects to text with CSS
- Text in Transparent Box using CSS3
- Working with CSS3 Filter Effects
- Add shadow effects to elements with CSS
- CSS Box Shadow
- Adding Drop Shadow to Images using CSS3
- CSS3 Box Width with Box-Sizing
- Create white text with black shadow using CSS
- CSS3 Flexible Box Layouts
- How to Create a Comment Box with a Containing Text Using CSS
- How to add shadow on text swift?
- How to Create CSS3 Keyframe Animations?
- How to create CSS3 Rounded Corners?
- How to limit input text length using CSS3?

Advertisements