- 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
Add a color to the shadow with CSS
To add a color to the shadow, use the box-shadow property and set the color, with the height and width.
You can try to run the following code to set the color to shadow:
Example
<!DOCTYPE html> <html> <head> <style> h2 { box-shadow: 10px 10px green; height: 70px; background-color: red; } </style> </head> <body> <h2>Heading Two</h2> <p>Above heading has shadow.</p> </body> </html>
- Related Articles
- Add shadow to elements with CSS
- Add a blur effect to the shadow with CSS
- Add shadow effects to text with CSS
- Add shadow effects to elements with CSS
- Add more than one shadow to a text with CSS
- Add a background color to the form input with CSS
- Shadow Filter with CSS
- Add a shadow to an element with Bootstrap 4
- Set the text shadow around a text with CSS
- Add hover color to a table with Bootstrap
- Create an attenuated shadow with CSS
- Set Drop Shadow Effect with CSS
- How to set the color of a text with CSS
- Display a blue shadow on image hover with CSS
- Change Cursor Color with CSS caret-color

Advertisements