

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 attach one or more drop-shadows to the box with JavaScript?
To attach drop-shadows to the box, use the boxShadow property in JavaScript. With this property, add the width of the shadow as well as color.
Example
You can try to run the following code to learn how to attach one or more drop-shadows.
<!DOCTYPE html> <html> <head> <style> #box { border: thick solid green; width: 300px; height: 200px } </style> </head> <body> <div id="box">Demo Text</div> <br><br> <button type="button" onclick="display()">Add drop shadow</button> <script> function display() { document.getElementById("box").style.boxShadow = "20px 15px 25px orange"; } </script> </body> </html>
- Related Questions & Answers
- How to increment one or more counters with JavaScript?
- How to find rows with exact value in one or more columns with MySQL?
- How to implement a constructor reference with one or more arguments in Java?
- Match any string containing one or more p's with JavaScript RegExp.
- How to use one or more same positional arguments in Python?
- How to transform two or more spaces in a string in only one space? JavaScript
- How to pass Drop Down Box Data to Python CGI script?
- How to create a data frame with one or more columns as a list in R?
- How to get the largest of zero or more numbers in JavaScript?
- How to get the smallest of zero or more numbers in JavaScript?
- How to estimate the gradient of a function in one or more dimensions in PyTorch?
- Attach event to dynamic elements in JavaScript?
- How to subset one or more sub-elements of a list in R?
- How to add one or more header cells a cell is related to in HTML?
- How to find the common elements between two or more arrays in JavaScript?
Advertisements